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 console

Obviously this should not be used in production.

Author:
  Stuart Douglas

### Field Summary

### Fields inherited from class org.xnio.conduits.AbstractConduit

`next`

### Constructor Summary

Constructors
Constructor and Description
`DebuggingStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)` Construct a new instance.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static void` `dump()`
`long` `transferFrom(FileChannel src, long position, long count)`
`long` `transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer)`
`int` `write(ByteBuffer src)`
`long` `write(ByteBuffer[] dsts, int offs, int len)`
`int` `writeFinal(ByteBuffer src)`
`long` `writeFinal(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`

### Methods inherited from class org.xnio.conduits.AbstractConduit

`getWorker`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.xnio.conduits.SinkConduit

`awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites`

### Methods inherited from interface org.xnio.conduits.Conduit

`getWorker`

### Constructor Detail

#### DebuggingStreamSinkConduit

    public DebuggingStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)

Construct a new instance.

Parameters:
  `next` - the delegate conduit to set

### Method Detail

#### write

    public int write(ByteBuffer src)
              throws IOException

Specified by:
  `write` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `write` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### write

    public long write(ByteBuffer[] dsts,
                      int offs,
                      int len)
               throws IOException

Specified by:
  `write` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `write` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### transferFrom

    public long transferFrom(FileChannel src,
                             long position,
                             long count)
                      throws IOException

Specified by:
  `transferFrom` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `transferFrom` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### transferFrom

    public long transferFrom(org.xnio.channels.StreamSourceChannel source,
                             long count,
                             ByteBuffer throughBuffer)
                      throws IOException

Specified by:
  `transferFrom` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `transferFrom` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### writeFinal

    public int writeFinal(ByteBuffer src)
                   throws IOException

Specified by:
  `writeFinal` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `writeFinal` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### writeFinal

    public long writeFinal(ByteBuffer[] srcs,
                           int offset,
                           int length)
                    throws IOException

Specified by:
  `writeFinal` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `writeFinal` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### dump

    public static void dump()