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 thePtyMode
s 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 int
available()
protected int
handleCR()
protected int
handleLF()
protected Buffer
insertCharacter(Buffer org, int c)
int
read()
int
read(byte[] b, int off, int len)
protected int
readRawInput()
void
write(byte[] buf, int off, int len)
void
write(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:
available
in classFilterInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Overrides:
read
in 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:
read
in classFilterInputStream
- Throws:
IOException
-
-