Package io.undertow.conduits
Class BytesReceivedStreamSourceConduit
- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSourceConduit<D>
-
- org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
-
- io.undertow.conduits.BytesReceivedStreamSourceConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit
,org.xnio.conduits.SourceConduit
,org.xnio.conduits.StreamSourceConduit
public class BytesReceivedStreamSourceConduit extends org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description BytesReceivedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, ByteActivityCallback callback)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read(java.nio.ByteBuffer dst)
long
read(java.nio.ByteBuffer[] dsts, int offs, int len)
long
transferTo(long position, long count, java.nio.channels.FileChannel target)
long
transferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)
-
Methods inherited from class org.xnio.conduits.AbstractSourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReads
-
-
-
-
Constructor Detail
-
BytesReceivedStreamSourceConduit
public BytesReceivedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, ByteActivityCallback callback)
Construct a new instance.- Parameters:
next
- the delegate conduit to setcallback
-
-
-
Method Detail
-
transferTo
public long transferTo(long position, long count, java.nio.channels.FileChannel target) throws java.io.IOException
- Specified by:
transferTo
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
transferTo
in classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
transferTo
public long transferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws java.io.IOException
- Specified by:
transferTo
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
transferTo
in classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
- Specified by:
read
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
read
in classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offs, int len) throws java.io.IOException
- Specified by:
read
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
read
in classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
-