public abstract class AbstractFixedLengthStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
Constructor and Description |
---|
AbstractFixedLengthStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
long contentLength,
boolean configurable,
boolean propagateClose)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
awaitWritable() |
void |
awaitWritable(long time,
TimeUnit timeUnit) |
protected void |
channelFinished() |
boolean |
flush() |
long |
getRemaining()
Get the number of remaining bytes in this fixed length channel.
|
boolean |
isWriteResumed() |
protected void |
reset(long contentLength,
boolean propagateClose) |
void |
terminateWrites() |
long |
transferFrom(FileChannel src,
long position,
long count) |
long |
transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer) |
void |
wakeupWrites() |
int |
write(ByteBuffer src) |
long |
write(ByteBuffer[] srcs,
int offset,
int length) |
int |
writeFinal(ByteBuffer src) |
long |
writeFinal(ByteBuffer[] srcs,
int offset,
int length) |
getWriteThread, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AbstractFixedLengthStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, long contentLength, boolean configurable, boolean propagateClose)
next
- the next channelcontentLength
- the content lengthconfigurable
- true
if this instance should pass configuration to the nextpropagateClose
- true
if this instance should pass close to the nextprotected void reset(long contentLength, boolean propagateClose)
public int write(ByteBuffer src) throws IOException
write
in interface org.xnio.conduits.StreamSinkConduit
write
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write
in interface org.xnio.conduits.StreamSinkConduit
write
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException
writeFinal
in interface org.xnio.conduits.StreamSinkConduit
writeFinal
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public int writeFinal(ByteBuffer src) throws IOException
writeFinal
in interface org.xnio.conduits.StreamSinkConduit
writeFinal
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long transferFrom(FileChannel src, long position, long count) throws IOException
transferFrom
in interface org.xnio.conduits.StreamSinkConduit
transferFrom
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException
transferFrom
in interface org.xnio.conduits.StreamSinkConduit
transferFrom
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public boolean flush() throws IOException
flush
in interface org.xnio.conduits.SinkConduit
flush
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public boolean isWriteResumed()
isWriteResumed
in interface org.xnio.conduits.SinkConduit
isWriteResumed
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
public void wakeupWrites()
wakeupWrites
in interface org.xnio.conduits.SinkConduit
wakeupWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
public void terminateWrites() throws IOException
terminateWrites
in interface org.xnio.conduits.SinkConduit
terminateWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public void awaitWritable() throws IOException
awaitWritable
in interface org.xnio.conduits.SinkConduit
awaitWritable
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public void awaitWritable(long time, TimeUnit timeUnit) throws IOException
awaitWritable
in interface org.xnio.conduits.SinkConduit
awaitWritable
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long getRemaining()
protected void channelFinished()
Copyright © 2014 JBoss by Red Hat. All rights reserved.