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:
- java.io.Closeable, java.nio.channels.Channel, java.nio.channels.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(java.nio.ByteBuffer dst)
Reads the available byte from the wrapped channel to the destination
buffer while writing them to the console. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.nio.channels.Channel |
close, isOpen |
ReadableTraceChannel
public ReadableTraceChannel(ReadableSelectionChannel wrappedChannel)
- Constructor.
- Parameters:
wrappedChannel
- The wrapped channel.
ReadableTraceChannel
public ReadableTraceChannel(ReadableSelectionChannel wrappedChannel,
java.io.OutputStream traceStream)
- Constructor.
- Parameters:
wrappedChannel
- The wrapped channel.traceStream
- The trace stream.
read
public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
- Reads the available byte from the wrapped channel to the destination
buffer while writing them to the console.
- Specified by:
read
in interface java.nio.channels.ReadableByteChannel
- Parameters:
dst
- The destination buffer.
- Returns:
- The number of bytes read.
- Throws:
java.io.IOException
Copyright © 2005-2013 Restlet S.A.S..