Package io.undertow.conduits
Class DebuggingStreamSinkConduit
- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSinkConduit<D>
-
- org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
-
- io.undertow.conduits.DebuggingStreamSinkConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SinkConduit,org.xnio.conduits.StreamSinkConduit
public class DebuggingStreamSinkConduit extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>Conduit that saves all the data that is written through it and can dump it to the consoleObviously this should not be used in production.
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description DebuggingStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddump()longtransferFrom(java.nio.channels.FileChannel src, long position, long count)longtransferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer)intwrite(java.nio.ByteBuffer src)longwrite(java.nio.ByteBuffer[] dsts, int offs, int len)intwriteFinal(java.nio.ByteBuffer src)longwriteFinal(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:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writein classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
java.io.IOException
-
write
public long write(java.nio.ByteBuffer[] dsts, int offs, int len) throws java.io.IOException- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writein 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:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
transferFromin 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:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
transferFromin 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:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writeFinalin 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:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writeFinalin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
java.io.IOException
-
dump
public static void dump()
-
-