Package org.apache.sshd.server.shell
Class TtyFilterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.sshd.server.shell.TtyFilterInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class TtyFilterInputStream extends FilterInputStream
Handles the input while taking into account thePtyModes for handling CR / LF- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static Set<PtyMode>INPUT_OPTIONS-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description TtyFilterInputStream(InputStream in, Collection<PtyMode> ttyOptions)TtyFilterInputStream(InputStream in, Map<PtyMode,?> modes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()protected inthandleCR()protected inthandleLF()protected BufferinsertCharacter(Buffer org, int c)intread()intread(byte[] b, int off, int len)protected intreadRawInput()voidwrite(byte[] buf, int off, int len)voidwrite(int c)-
Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
TtyFilterInputStream
public TtyFilterInputStream(InputStream in, Map<PtyMode,?> modes)
-
TtyFilterInputStream
public TtyFilterInputStream(InputStream in, Collection<PtyMode> ttyOptions)
-
-
Method Detail
-
write
public void write(int c)
-
write
public void write(byte[] buf, int off, int len)
-
available
public int available() throws IOException- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
read
public int read() throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
handleCR
protected int handleCR() throws IOException- Throws:
IOException
-
handleLF
protected int handleLF() throws IOException- Throws:
IOException
-
readRawInput
protected int readRawInput() throws IOException- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
-