public final class FinishableStreamSourceConduit extends AbstractStreamSourceConduit<StreamSourceConduit>
next| Constructor and Description |
|---|
FinishableStreamSourceConduit(StreamSourceConduit next,
ConduitListener<? super FinishableStreamSourceConduit> finishListener) |
| Modifier and Type | Method and Description |
|---|---|
int |
read(ByteBuffer dst)
Read a sequence of bytes from this conduit to the given buffer.
|
long |
read(ByteBuffer[] dsts,
int offset,
int length)
Read a sequence of bytes from this conduit to the given buffers.
|
long |
transferTo(long count,
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, wakeupReadsgetWorkerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReadspublic FinishableStreamSourceConduit(StreamSourceConduit next, ConduitListener<? super FinishableStreamSourceConduit> finishListener)
public long transferTo(long position,
long count,
FileChannel target)
throws IOException
StreamSourceConduittransferTo in interface StreamSourceConduittransferTo in class AbstractStreamSourceConduit<StreamSourceConduit>position - the position within the file from which the transfer is to begincount - the number of bytes to be transferredtarget - the file to write toIOException - if an I/O error occurspublic long transferTo(long count,
ByteBuffer throughBuffer,
StreamSinkChannel target)
throws IOException
StreamSourceConduitthroughBuffer 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.transferTo in interface StreamSourceConduittransferTo in class AbstractStreamSourceConduit<StreamSourceConduit>count - the number of bytes to be transferredthroughBuffer - the buffer to copy through.target - the destination to write toIOException - if an I/O error occurspublic long read(ByteBuffer[] dsts, int offset, int length) throws IOException
StreamSourceConduitread in interface StreamSourceConduitread in class AbstractStreamSourceConduit<StreamSourceConduit>offset - the offset into the buffer arraylength - the number of buffers to fillSourceConduit.terminateReads() method was previously calledIOException - if an error occurspublic int read(ByteBuffer dst) throws IOException
StreamSourceConduitread in interface StreamSourceConduitread in class AbstractStreamSourceConduit<StreamSourceConduit>SourceConduit.terminateReads() method was previously calledIOException - if an error occursCopyright © 2017 JBoss by Red Hat. All rights reserved.