org.xnio.conduits.Conduit
, org.xnio.conduits.SinkConduit
, org.xnio.conduits.StreamSinkConduit
public final class HeadStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
Constructor | Description |
---|---|
HeadStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
ConduitListener<? super HeadStreamSinkConduit> finishListener) |
Construct a new instance.
|
HeadStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
ConduitListener<? super HeadStreamSinkConduit> finishListener,
boolean shutdownDelegate) |
Construct a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
flush() |
|
boolean |
isWriteResumed() |
|
void |
resumeWrites() |
|
void |
suspendWrites() |
|
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 |
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) |
awaitWritable, awaitWritable, getWriteThread, isWriteShutdown, setWriteReadyHandler, truncateWrites
public HeadStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, ConduitListener<? super HeadStreamSinkConduit> finishListener)
next
- the next channelfinishListener
- the listener to call when the channel is closed or the length is reachedpublic HeadStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, ConduitListener<? super HeadStreamSinkConduit> finishListener, boolean shutdownDelegate)
next
- the next channelfinishListener
- the listener to call when the channel is closed or the length is reachedpublic int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface org.xnio.conduits.StreamSinkConduit
write
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
write
in interface org.xnio.conduits.StreamSinkConduit
write
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public int writeFinal(java.nio.ByteBuffer src) throws java.io.IOException
writeFinal
in interface org.xnio.conduits.StreamSinkConduit
writeFinal
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public long writeFinal(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
writeFinal
in interface org.xnio.conduits.StreamSinkConduit
writeFinal
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public long transferFrom(java.nio.channels.FileChannel src, long position, long count) throws java.io.IOException
transferFrom
in interface org.xnio.conduits.StreamSinkConduit
transferFrom
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer) throws java.io.IOException
transferFrom
in interface org.xnio.conduits.StreamSinkConduit
transferFrom
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public boolean flush() throws java.io.IOException
flush
in interface org.xnio.conduits.SinkConduit
flush
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
public void suspendWrites()
suspendWrites
in interface org.xnio.conduits.SinkConduit
suspendWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
public void resumeWrites()
resumeWrites
in interface org.xnio.conduits.SinkConduit
resumeWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
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 java.io.IOException
terminateWrites
in interface org.xnio.conduits.SinkConduit
terminateWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
java.io.IOException
Copyright © 2018. All rights reserved.