Package com.adobe.internal.io.stream
Class NullOutputByteStream
- java.lang.Object
-
- com.adobe.internal.io.stream.NullOutputByteStream
-
- All Implemented Interfaces:
OutputByteStream
public class NullOutputByteStream extends java.lang.Object
Only for internal engineering use. This api can change without notice.
-
-
Field Summary
-
Fields inherited from interface com.adobe.internal.io.stream.OutputByteStream
EOF
-
-
Constructor Summary
Constructors Constructor Description NullOutputByteStream()
Only for internal engineering use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Only for internal engineering use.InputByteStream
closeAndConvert()
Only for internal engineering use.boolean
eof()
Only for internal engineering use.void
flush()
Only for internal engineering use.long
getPosition()
Only for internal engineering use.long
length()
Only for internal engineering use.OutputByteStream
seek(long position)
Only for internal engineering use.SkippingOutputStream
toOutputStream()
This will return a new OutputStream that wraps the same bytes as the OutputByteStream.void
write(byte[] bytes)
Only for internal engineering use.void
write(byte[] bytes, int offset, int length)
Only for internal engineering use.void
write(int b)
Only for internal engineering use.
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
Only for internal engineering use. This api can change without notice.- Specified by:
write
in interfaceOutputByteStream
- Throws:
java.io.IOException
-
write
public void write(byte[] bytes, int offset, int length) throws java.io.IOException
Description copied from interface:OutputByteStream
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.- Specified by:
write
in interfaceOutputByteStream
- 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
-
length
public long length() throws java.io.IOException
Description copied from interface:OutputByteStream
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:
java.io.IOException
-
close
public void close() throws java.io.IOException
Description copied from interface:OutputByteStream
Only for internal engineering use. This api can change without notice.- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
Description copied from interface:OutputByteStream
Only for internal engineering use. This api can change without notice.- Throws:
java.io.IOException
-
write
public void write(byte[] bytes) throws java.io.IOException
Description copied from interface:OutputByteStream
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.- Specified by:
write
in interfaceOutputByteStream
- Parameters:
bytes
- The source array.- Throws:
java.io.IOException
-
seek
public 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.- Specified by:
seek
in interfaceOutputByteStream
- Parameters:
position
- Where to set the current position.- Returns:
- This object.
- Throws:
java.io.IOException
-
getPosition
public long getPosition() throws java.io.IOException
Description copied from interface:OutputByteStream
Only for internal engineering use. This api can change without notice. Get the current position.- Specified by:
getPosition
in interfaceOutputByteStream
- Returns:
- The current position.
- Throws:
java.io.IOException
-
eof
public boolean eof() throws java.io.IOException
Description copied from interface:OutputByteStream
Only for internal engineering use. This api can change without notice. Is the current position of thisOutputByteStream
at or beyond the end of the underlying data.- Specified by:
eof
in interfaceOutputByteStream
- Returns:
- True if the current position is beyond the end of the underlying data, false otherwise.
- Throws:
java.io.IOException
-
toOutputStream
public SkippingOutputStream toOutputStream() throws java.io.IOException
Description copied from interface:OutputByteStream
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.- Specified by:
toOutputStream
in interfaceOutputByteStream
- Returns:
- an OutputStream that wraps the same bytes
- Throws:
java.io.IOException
-
closeAndConvert
public InputByteStream closeAndConvert() throws java.io.IOException
Description copied from interface:OutputByteStream
Only for internal engineering use. This api can change without notice.- Specified by:
closeAndConvert
in interfaceOutputByteStream
- Throws:
java.io.IOException
-
-