Top Description Fields Constructors Methods
org.apache.sshd.common.util.io.output

public Class LoggingFilterOutputStream

extends FilterOutputStream
Class Inheritance
Imports
java.io.FilterOutputStream, .IOException, .OutputStream, java.util.concurrent.atomic.AtomicInteger, org.apache.sshd.common.CommonModuleProperties, .PropertyResolver, org.apache.sshd.common.util.buffer.BufferUtils, org.apache.sshd.common.util.logging.LoggingUtils, .SimplifiedLog, org.slf4j.Logger

Dumps everything that is written to the stream to the logger
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final int
private final SimplifiedLog
private final String
private final AtomicInteger
Inherited from java.io.FilterOutputStream:
out

Constructor Summary

AccessConstructor and Description
public
public
LoggingFilterOutputStream(OutputStream out, String msg, Logger log, int chunkSize)

Method Summary

Modifier and TypeMethod and Description
public void
write(int
the byte.
b
)

Overrides java.io.FilterOutputStream.write.

Writes the specified byte to this output stream.

public void
write(byte[]
the data.
b
,
int
the start offset in the data.
off
,
int
the number of bytes to write.
len
)

Overrides java.io.FilterOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

Inherited from java.io.FilterOutputStream:
closeflushwrite

Field Detail

chunkSizeback to summary
private final int chunkSize
logback to summary
private final SimplifiedLog log
msgback to summary
private final String msg
writeCountback to summary
private final AtomicInteger writeCount

Constructor Detail

LoggingFilterOutputStreamback to summary
public LoggingFilterOutputStream(OutputStream out, String msg, Logger log, PropertyResolver resolver)
LoggingFilterOutputStreamback to summary
public LoggingFilterOutputStream(OutputStream out, String msg, Logger log, int chunkSize)

Method Detail

writeback to summary
public void write(int b) throws IOException

Overrides java.io.FilterOutputStream.write.

Doc from java.io.FilterOutputStream.write.

Writes the specified byte to this output stream.

The write method of FilterOutputStream calls the write method of its underlying output stream, that is, it performs out.write(b).

Implements the abstract write method of OutputStream.

Parameters
b:int

the byte.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(byte[] b, int off, int len) throws IOException

Overrides java.io.FilterOutputStream.write.

Doc from java.io.FilterOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

Parameters
b:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.