Package nom.tam.util
Class ByteBufferOutputStream
java.lang.Object
java.io.OutputStream
nom.tam.util.ByteBufferOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Stream interface for writing to a
ByteBuffer
(primarily for internal use)- See Also:
-
Constructor Summary
ConstructorDescriptionByteBufferOutputStream
(ByteBuffer buffer) Creates an newOutpuStream
, which writes aByteBuffer
starting at the current buffer position. -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
Constructor Details
-
ByteBufferOutputStream
Creates an newOutpuStream
, which writes aByteBuffer
starting at the current buffer position. Itswrite()
methods can be intermixed with theput()
methods of the buffer, and also withByteBuffer.position(int)
, maintaining overall sequentiality of the calls. In other words, the stream's output is not decopuled from direct access to the buffer.- Parameters:
buffer
- the buffer to write to
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-