org.xnio.conduits.Conduit, org.xnio.conduits.SinkConduit, org.xnio.conduits.StreamSinkConduitServerFixedLengthStreamSinkConduitpublic abstract class AbstractFixedLengthStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
| Constructor | Description |
|---|---|
AbstractFixedLengthStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
long contentLength,
boolean configurable,
boolean propagateClose) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
awaitWritable() |
|
void |
awaitWritable(long time,
java.util.concurrent.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(java.nio.channels.FileChannel src,
long position,
long count) |
|
long |
transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
java.nio.ByteBuffer throughBuffer) |
|
void |
truncateWrites() |
|
void |
wakeupWrites() |
|
int |
write(java.nio.ByteBuffer src) |
|
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
|
int |
writeFinal(java.nio.ByteBuffer src) |
|
long |
writeFinal(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
getWriteThread, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWritespublic 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(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long writeFinal(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic int writeFinal(java.nio.ByteBuffer src)
throws java.io.IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long transferFrom(java.nio.channels.FileChannel src,
long position,
long count)
throws java.io.IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
java.nio.ByteBuffer throughBuffer)
throws java.io.IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic boolean flush()
throws java.io.IOException
flush in interface org.xnio.conduits.SinkConduitflush in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic boolean isWriteResumed()
isWriteResumed in interface org.xnio.conduits.SinkConduitisWriteResumed in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>public void wakeupWrites()
wakeupWrites in interface org.xnio.conduits.SinkConduitwakeupWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>public void terminateWrites()
throws java.io.IOException
terminateWrites in interface org.xnio.conduits.SinkConduitterminateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void truncateWrites()
throws java.io.IOException
truncateWrites in interface org.xnio.conduits.SinkConduittruncateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void awaitWritable()
throws java.io.IOException
awaitWritable in interface org.xnio.conduits.SinkConduitawaitWritable in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void awaitWritable(long time,
java.util.concurrent.TimeUnit timeUnit)
throws java.io.IOException
awaitWritable in interface org.xnio.conduits.SinkConduitawaitWritable in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long getRemaining()
protected void channelFinished()
Copyright © 2018. All rights reserved.