public interface StreamSourceConduit extends SourceConduit
Modifier and Type | Method and Description |
---|---|
int |
read(java.nio.ByteBuffer dst)
Read a sequence of bytes from this conduit to the given buffer.
|
long |
read(java.nio.ByteBuffer[] dsts,
int offs,
int len)
Read a sequence of bytes from this conduit to the given buffers.
|
long |
transferTo(long count,
java.nio.ByteBuffer throughBuffer,
StreamSinkChannel target)
Transfers bytes into the given channel target.
|
long |
transferTo(long position,
long count,
FileChannel target)
Transfers bytes into the given file from this channel.
|
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReads
long transferTo(long position, long count, FileChannel target) throws java.io.IOException
position
- the position within the file from which the transfer is to begincount
- the number of bytes to be transferredtarget
- the file to write tojava.io.IOException
- if an I/O error occurslong transferTo(long count, java.nio.ByteBuffer throughBuffer, StreamSinkChannel target) throws java.io.IOException
throughBuffer
will be cleared. On exit, the buffer will be
flipped for emptying, and may possibly be empty or may contain data. If this method returns a value less than
count
, then the remaining data in throughBuffer
may contain data read from this channel which must
be written to target
to complete the operation.count
- the number of bytes to be transferredthroughBuffer
- the buffer to copy through.target
- the destination to write tojava.io.IOException
- if an I/O error occursint read(java.nio.ByteBuffer dst) throws java.io.IOException
src
- the buffer to fill with data from the conduitSourceConduit.terminateReads()
method was previously calledjava.io.IOException
- if an error occurslong read(java.nio.ByteBuffer[] dsts, int offs, int len) throws java.io.IOException
srcs
- the buffers to fill with data from the conduitoffs
- the offset into the buffer arraylen
- the number of buffers to fillSourceConduit.terminateReads()
method was previously calledjava.io.IOException
- if an error occursCopyright © 2016 JBoss, a division of Red Hat, Inc.