Package io.undertow.conduits
Class RangeStreamSinkConduit
- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSinkConduit<D>
-
- org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
-
- io.undertow.conduits.RangeStreamSinkConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit
,org.xnio.conduits.SinkConduit
,org.xnio.conduits.StreamSinkConduit
public class RangeStreamSinkConduit extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description RangeStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, long start, long end, long originalResponseLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
transferFrom(java.nio.channels.FileChannel src, long position, long count)
long
transferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer)
int
write(java.nio.ByteBuffer src)
long
write(java.nio.ByteBuffer[] srcs, int offs, int len)
int
writeFinal(java.nio.ByteBuffer src)
long
writeFinal(java.nio.ByteBuffer[] srcs, int offset, int length)
-
Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites
-
-
-
-
Method Detail
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
write
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
write
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
java.io.IOException
-
write
public long write(java.nio.ByteBuffer[] srcs, int offs, int len) throws java.io.IOException
- Specified by:
write
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
write
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
java.io.IOException
-
transferFrom
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer) throws java.io.IOException
- Specified by:
transferFrom
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
transferFrom
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
java.io.IOException
-
transferFrom
public long transferFrom(java.nio.channels.FileChannel src, long position, long count) throws java.io.IOException
- Specified by:
transferFrom
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
transferFrom
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
java.io.IOException
-
writeFinal
public long writeFinal(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
- Specified by:
writeFinal
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
writeFinal
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
java.io.IOException
-
writeFinal
public int writeFinal(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
writeFinal
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
writeFinal
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
java.io.IOException
-
-