| Modifier and Type | Field and Description |
|---|---|
| private static final ByteBuffer | |
| private static final FileChannel |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: the number of bytes drained, 0 if reading the conduit would block, or -1 if the EOF was reachedthe conduit to drain conduit, long the number of bytes count)Attempt to drain the given number of bytes from the stream source conduit. |
| public static boolean | Returns: true if the message was sent successfullyThe conduit conduit, ByteBuffer The message buffer src)Writes a message to the conduit, and terminates writes if the send was successfully. |
| public static boolean | Returns: true if the message was sent successfullyThe conduit conduit, ByteBuffer[] The message buffers srcs, int The offset in the message buffers offset, int The number of buffers to send length)Writes a message to the conduit, and terminates writes if the send was successfully. |
| public static long | Returns: the number of bytes actually transferred (possibly 0)the source channel to read bytes from source, final long the number of bytes to transfer (must be >= count, final ByteBuffer 0L)the buffer to transfer through (must not be throughBuffer, final WritableByteChannel null)the sink channel to write bytes to sink)Platform-independent channel-to-channel transfer method. |
| public static long | Returns: the number of bytes actually transferred (possibly 0)the source channel to read bytes from source, final long the number of bytes to transfer (must be >= count, final ByteBuffer 0L)the buffer to transfer through (must not be throughBuffer, final StreamSinkConduit null)the sink channel to write bytes to sink)Platform-independent channel-to-channel transfer method. |
| public static int | Returns: The number of bytes writtenThe conduit to write to conduit, ByteBuffer The data to write src)Writes the buffer to the conduit, and terminates writes if all the data is written |
| public static long | Returns: The number of bytes writtenThe conduit to write to conduit, ByteBuffer[] The data to write srcs, int The offset into the data array offset, int The number of buffers to write length)Writes the buffer to the conduit, and terminates writes if all the data is written |
| DRAIN_BUFFER | back to summary |
|---|---|
| private static final ByteBuffer DRAIN_BUFFER | |
| NULL_FILE_CHANNEL | back to summary |
|---|---|
| private static final FileChannel NULL_FILE_CHANNEL | |
| Conduits | back to summary |
|---|---|
| public Conduits() | |
| drain | back to summary |
|---|---|
| public static long drain(StreamSourceConduit conduit, long count) throws IOException Attempt to drain the given number of bytes from the stream source conduit.
| |
| sendFinalBasic | back to summary |
|---|---|
| public static boolean sendFinalBasic(MessageSinkConduit conduit, ByteBuffer src) throws IOException Writes a message to the conduit, and terminates writes if the send was successfully.
| |
| sendFinalBasic | back to summary |
|---|---|
| public static boolean sendFinalBasic(MessageSinkConduit conduit, ByteBuffer[] srcs, int offset, int length) throws IOException Writes a message to the conduit, and terminates writes if the send was successfully.
| |
| transfer | back to summary |
|---|---|
| public static long transfer(final StreamSourceConduit source, final long count, final ByteBuffer throughBuffer, final WritableByteChannel sink) throws IOException Platform-independent channel-to-channel transfer method. Uses regular If either or both of the given channels are blocking channels, then this method may block.
| |
| transfer | back to summary |
|---|---|
| public static long transfer(final ReadableByteChannel source, final long count, final ByteBuffer throughBuffer, final StreamSinkConduit sink) throws IOException Platform-independent channel-to-channel transfer method. Uses regular If either or both of the given channels are blocking channels, then this method may block.
| |
| writeFinalBasic | back to summary |
|---|---|
| public static int writeFinalBasic(StreamSinkConduit conduit, ByteBuffer src) throws IOException Writes the buffer to the conduit, and terminates writes if all the data is written
| |
| writeFinalBasic | back to summary |
|---|---|
| public static long writeFinalBasic(StreamSinkConduit conduit, ByteBuffer[] srcs, int offset, int length) throws IOException Writes the buffer to the conduit, and terminates writes if all the data is written
| |