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
ConstructorsConstructorDescriptionByteBufferOutputStream(ByteBuffer buffer) Creates an newOutpuStream, which writes aByteBufferstarting 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 aByteBufferstarting 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:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-