| Modifier and Type | Method and Description |
|---|---|
| public ChannelListener. | getCloseSetter()
Redeclares org. Get the setter which can be used to change the close listener for this channel. |
| public ChannelListener. | getWriteSetter()
Redeclares org. Get the setter which can be used to change the write listener for this channel. |
| public long | Returns: the number of bytes (possibly 0) that were actually transferredthe file to read from src, long the position within the file from which the transfer is to begin position, long the number of bytes to be transferred count)Transfer bytes into this channel from the given file. |
| public long | Returns: the number of bytes (possibly 0) that were actually transferred, or -1 if the end of input was reachedthe source to read from source, long the number of bytes to be transferred count, ByteBuffer the buffer to copy through. throughBuffer)Transfers bytes from the given channel source. |
| public int | Returns: The amount of data that was actually written.The data to write src)Writes some data to the channel, with the same semantics as
|
| public long | Returns: The amount of data that was actually writtenThe buffers from which bytes are to be retrieved srcs, int The offset within the buffer array of the first buffer from
which bytes are to be retrieved; must be non-negative and no
larger than srcs.length offset, int The maximum number of buffers to be accessed; must be
non-negative and no larger than
srcs.length - offset length)Writes some data to the channel, with the same semantics as
|
| public long | Returns: The amount of data that was actually writtenThe buffers from which bytes are to be retrieved srcs)Writes some data to the channel, with the same semantics as
|
| getCloseSetter | back to summary |
|---|---|
| public ChannelListener. Redeclares org. Doc from org. Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.
| |
| getWriteSetter | back to summary |
|---|---|
| public ChannelListener. Redeclares org. Doc from org. Get the setter which can be used to change the write listener for this channel.
| |
| transferFrom | back to summary |
|---|---|
| public long transferFrom(FileChannel src, long position, long count) throws IOException Transfer bytes into this channel from the given file. Using this method in preference to
If the current thread is interrupted when this method is called, it may throw a
| |
| transferFrom | back to summary |
|---|---|
| public long transferFrom(StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException Transfers bytes from the given channel source. On some platforms, this may avoid copying bytes between user
and kernel space. On other platforms, bytes are passed through the
If the current thread is interrupted when this method is called, it may throw a
| |
| writeFinal | back to summary |
|---|---|
| public int writeFinal(ByteBuffer src) throws IOException Writes some data to the channel, with the same semantics as
| |
| writeFinal | back to summary |
|---|---|
| public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException Writes some data to the channel, with the same semantics as
| |
| writeFinal | back to summary |
|---|---|
| public long writeFinal(ByteBuffer[] srcs) throws IOException Writes some data to the channel, with the same semantics as
| |