Package com.adobe.internal.io.stream
Interface OutputByteStream
-
- All Known Implementing Classes:
NullOutputByteStream
public interface OutputByteStreamA seekable OutputStream.
-
-
Field Summary
Fields Modifier and Type Field Description static intEOFOnly for internal engineering use.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Only for internal engineering use.InputByteStreamcloseAndConvert()Only for internal engineering use.booleaneof()Only for internal engineering use.voidflush()Only for internal engineering use.longgetPosition()Only for internal engineering use.longlength()Only for internal engineering use.OutputByteStreamseek(long position)Only for internal engineering use.SkippingOutputStreamtoOutputStream()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 Detail
-
EOF
static final int EOF
Only for internal engineering use. This api can change without notice.- See Also:
- Constant Field Values
-
-
Method Detail
-
write
void write(int b) throws java.io.IOExceptionOnly 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:
java.io.IOException
-
write
void write(byte[] bytes, int offset, int length) throws java.io.IOExceptionOnly 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:
java.io.IOException
-
write
void write(byte[] bytes) throws java.io.IOExceptionOnly 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:
java.io.IOException
-
seek
OutputByteStream seek(long position) throws java.io.IOException
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:
java.io.IOException
-
getPosition
long getPosition() throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice. Get the current position.- Returns:
- The current position.
- Throws:
java.io.IOException
-
length
long length() throws java.io.IOExceptionOnly 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:
java.io.IOException
-
eof
boolean eof() throws java.io.IOExceptionOnly 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:
java.io.IOException
-
close
void close() throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice.- Throws:
java.io.IOException
-
closeAndConvert
InputByteStream closeAndConvert() throws java.io.IOException
Only for internal engineering use. This api can change without notice.- Throws:
java.io.IOException
-
flush
void flush() throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice.- Throws:
java.io.IOException
-
toOutputStream
SkippingOutputStream toOutputStream() throws java.io.IOException
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:
java.io.IOException
-
-