Package io.deephaven.io.streams
Class NullByteBufferSink
java.lang.Object
io.deephaven.io.streams.NullByteBufferSink
- All Implemented Interfaces:
ByteBufferSink
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptBuffer(ByteBuffer b, int need) Dispose of the contents of the buffer b, probably by writing them to a channel, and return a new buffer in which writing can continue.voidclose(ByteBuffer b) Dispose of the contents of the final buffer in an output sequence, probably by writing them to a channel.
-
Constructor Details
-
NullByteBufferSink
public NullByteBufferSink()
-
-
Method Details
-
acceptBuffer
Description copied from interface:ByteBufferSinkDispose of the contents of the buffer b, probably by writing them to a channel, and return a new buffer in which writing can continue. The returned buffer must have at least need bytes of space remaining. The return value may be the same buffer, as long as it's remaining() value has been increased to be >= need.- Specified by:
acceptBufferin interfaceByteBufferSink- Parameters:
b- the buffer whose contents need to be disposed of.- Returns:
- the buffer in which further output should be written.
- Throws:
IOException
-
close
Description copied from interface:ByteBufferSinkDispose of the contents of the final buffer in an output sequence, probably by writing them to a channel. Note that the argument buffer may be empty. Then do whatever it takes to release the resources of the sink, probably by closing a channel.- Specified by:
closein interfaceByteBufferSink- Throws:
IOException
-