Top Description Fields Constructors Methods
org.apache.sshd.server.shell

public Class TtyFilterOutputStream

extends FilterOutputStream
Class Inheritance
Imports
java.io.FilterOutputStream, .IOException, .OutputStream, java.util.Collection, .Collections, .EnumSet, .Map, .Objects, .Set, org.apache.sshd.common.channel.PtyMode, org.apache.sshd.common.util.GenericUtils

Handles the output stream while taking care of the PtyMode for CR / LF and ECHO settings
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final TtyFilterInputStream
public static final Set<PtyMode>
private final Set<PtyMode>
Inherited from java.io.FilterOutputStream:
out

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

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

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.

protected void
protected void
writeRawOutput(byte[] b, int off, int len)

Inherited from java.io.FilterOutputStream:
closeflushwrite

Field Detail

echoback to summary
private final TtyFilterInputStream echo
OUTPUT_OPTIONSback to summary
public static final Set<PtyMode> OUTPUT_OPTIONS
ttyOptionsback to summary
private final Set<PtyMode> ttyOptions

Constructor Detail

TtyFilterOutputStreamback to summary
public TtyFilterOutputStream(OutputStream out, TtyFilterInputStream echo, Map<PtyMode, ?> modes)
TtyFilterOutputStreamback to summary
public TtyFilterOutputStream(OutputStream out, TtyFilterInputStream echo, Collection<PtyMode> ttyOptions)

Method Detail

handleCRback to summary
protected void handleCR() throws IOException
handleLFback to summary
protected void handleLF() throws IOException
writeback to summary
public void write(int c) 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
c: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.
writeRawOutputback to summary
protected void writeRawOutput(int c) throws IOException
writeRawOutputback to summary
protected void writeRawOutput(byte[] b, int off, int len) throws IOException