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.FilterInputStreamHandles the input while taking into account thePtyModes for handling CR / LF
-
-
Field Summary
Fields Modifier and Type Field Description private Bufferbufferstatic java.util.Set<PtyMode>INPUT_OPTIONSprivate intlastCharprivate 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 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)
-
-
-
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:
availablein classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin 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:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-