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:
java.io.Closeable
,java.lang.AutoCloseable
public class TtyFilterInputStream extends java.io.FilterInputStream
Handles the input while taking into account thePtyMode
s for handling CR / LF
-
-
Field Summary
Fields Modifier and Type Field Description private Buffer
buffer
static java.util.Set<PtyMode>
INPUT_OPTIONS
private int
lastChar
private java.util.Set<PtyMode>
ttyOptions
-
Constructor Summary
Constructors Constructor Description TtyFilterInputStream(java.io.InputStream in, java.util.Collection<PtyMode> ttyOptions)
TtyFilterInputStream(java.io.InputStream in, java.util.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
-
-
-
-
Method Detail
-
write
public void write(int c)
-
write
public void write(byte[] buf, int off, int len)
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
handleCR
protected int handleCR() throws java.io.IOException
- Throws:
java.io.IOException
-
handleLF
protected int handleLF() throws java.io.IOException
- Throws:
java.io.IOException
-
readRawInput
protected int readRawInput() throws java.io.IOException
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
-