org.restlet.engine.io
Class WritableTraceChannel
java.lang.Object
org.restlet.engine.io.WrapperChannel<T>
org.restlet.engine.io.WrapperSelectionChannel<T>
org.restlet.engine.io.TraceChannel<WritableSelectionChannel>
org.restlet.engine.io.WritableTraceChannel
- All Implemented Interfaces:
- Closeable, Channel, WritableByteChannel, BlockableChannel, SelectionChannel, WritableSelectionChannel
public class WritableTraceChannel
- extends TraceChannel<WritableSelectionChannel>
- implements WritableSelectionChannel
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 |
write(ByteBuffer src)
Writes the available byte from the wrapped channel to the destination
buffer while writing them to the console. |
WritableTraceChannel
public WritableTraceChannel(WritableSelectionChannel wrappedChannel)
- Constructor.
- Parameters:
wrappedChannel
- The wrapped channel.
WritableTraceChannel
public WritableTraceChannel(WritableSelectionChannel wrappedChannel,
OutputStream traceStream)
- Constructor.
- Parameters:
wrappedChannel
- The wrapped channel.traceStream
- The trace stream.
write
public int write(ByteBuffer src)
throws IOException
- Writes the available byte from the wrapped channel to the destination
buffer while writing them to the console.
- Specified by:
write
in interface WritableByteChannel
- Parameters:
src
- The source buffer.
- Returns:
- The number of bytes written.
- Throws:
IOException
Copyright © 2005-2013 Restlet.