Package com.adobe.internal.io.stream
Interface OutputByteStream
- All Known Implementing Classes:
NullOutputByteStream
public interface OutputByteStream
A seekable OutputStream.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Only for internal engineering use.Only for internal engineering use.booleaneof()Only for internal engineering use.voidflush()Only for internal engineering use.longOnly for internal engineering use.longlength()Only for internal engineering use.seek(long position) Only for internal engineering use.This will return a new OutputStream that wraps the same bytes as the OutputByteStream.voidwrite(byte[] bytes) Only for internal engineering use.voidwrite(byte[] bytes, int offset, int length) Only for internal engineering use.voidwrite(int b) Only for internal engineering use.
-
Field Details
-
EOF
static final int EOFOnly for internal engineering use. This api can change without notice.- See Also:
-
-
Method Details
-
write
Only for internal engineering use. This api can change without notice. Write a byte at the current position. If the current position is at or beyond the end of the underlying data return a-1. If not beyond the end of the underlying data the current position is incremented by 1.- Throws:
IOException
-
write
Only for internal engineering use. This api can change without notice. Write an array of bytes starting at the current position. The position is incremented by the length of the array that has been written.- Parameters:
bytes- The source array.offset- The offset in the byte array to begin writing from.length- The number of bytes to write.- Throws:
IOException
-
write
Only for internal engineering use. This api can change without notice. Write an array of bytes starting at the current position. The position is incremented by the length of the array that has been written.- Parameters:
bytes- The source array.- Throws:
IOException
-
seek
Only for internal engineering use. This api can change without notice. Set the current position in the underlying data.- Parameters:
position- Where to set the current position.- Returns:
- This object.
- Throws:
IOException
-
getPosition
Only for internal engineering use. This api can change without notice. Get the current position.- Returns:
- The current position.
- Throws:
IOException
-
length
Only for internal engineering use. This api can change without notice. The number of bytes that can exist in thisOutputByteStream.- Returns:
- Total number of bytes available in this
OutputByteStream. - Throws:
IOException
-
eof
Only for internal engineering use. This api can change without notice. Is the current position of thisOutputByteStreamat or beyond the end of the underlying data.- Returns:
- True if the current position is beyond the end of the underlying data, false otherwise.
- Throws:
IOException
-
close
Only for internal engineering use. This api can change without notice.- Throws:
IOException
-
closeAndConvert
Only for internal engineering use. This api can change without notice.- Throws:
IOException
-
flush
Only for internal engineering use. This api can change without notice.- Throws:
IOException
-
toOutputStream
This will return a new OutputStream that wraps the same bytes as the OutputByteStream. Writing to or positioning either one will affect the other. This OutputStream may be safely closed without that causing the OutputByteStream to be closed. This is commonly used for external libraries that need an OutputStream. Do NOT use it to pass data around internally as this will generally be inefficient and cause conversion and memory usage.- Returns:
- an OutputStream that wraps the same bytes
- Throws:
IOException
-