org.restlet.engine.io
Class ReadableTraceChannel
java.lang.Object
org.restlet.engine.io.WrapperChannel<T>
org.restlet.engine.io.WrapperSelectionChannel<T>
org.restlet.engine.io.TraceChannel<ReadableSelectionChannel>
org.restlet.engine.io.ReadableTraceChannel
- All Implemented Interfaces:
- Closeable, Channel, ReadableByteChannel, BlockableChannel, ReadableSelectionChannel, SelectionChannel
public class ReadableTraceChannel
- extends TraceChannel<ReadableSelectionChannel>
- implements ReadableSelectionChannel
Trace byte channel that sends a copy of all data on the trace output stream.
It is important to implement SelectionChannel as some framework
classes rely on this down the processing chain.
- Author:
- Jerome Louvel
|
Method Summary |
int |
read(ByteBuffer dst)
Reads the available byte from the wrapped channel to the destination
buffer while writing them to the console. |
ReadableTraceChannel
public ReadableTraceChannel(ReadableSelectionChannel wrappedChannel)
- Constructor.
- Parameters:
wrappedChannel - The wrapped channel.
ReadableTraceChannel
public ReadableTraceChannel(ReadableSelectionChannel wrappedChannel,
OutputStream traceStream)
- Constructor.
- Parameters:
wrappedChannel - The wrapped channel.traceStream - The trace stream.
read
public int read(ByteBuffer dst)
throws IOException
- Reads the available byte from the wrapped channel to the destination
buffer while writing them to the console.
- Specified by:
read in interface ReadableByteChannel
- Parameters:
dst - The destination buffer.
- Returns:
- The number of bytes read.
- Throws:
IOException
Copyright © 2005-2014 Restlet.