Class TelnetTerminal.TelnetClientIACFilterer
java.lang.Object
java.io.InputStream
com.googlecode.lanterna.terminal.ansi.TelnetTerminal.TelnetClientIACFilterer
- All Implemented Interfaces:
Closeable, AutoCloseable
- Enclosing class:
TelnetTerminal
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private intprivate final InputStreamprivate final TelnetTerminal.NegotiationStateprivate Socketprivate final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()private voidfillBuffer(boolean block) private voidparseCommand(byte[] buffer, int position, int max) private intparseSubNegotiation(byte[] buffer, int position, int max) private voidparseSubNegotiation(byte option, byte[] additionalData) intread()intread(byte[] b, int off, int len) private voidsetEventListener(TelnetTerminal.TelnetClientEventListener eventListener) Methods inherited from class InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
negotiationState
-
inputStream
-
buffer
private final byte[] buffer -
workingBuffer
private final byte[] workingBuffer -
bytesInBuffer
private int bytesInBuffer -
eventListener
-
socket
-
-
Constructor Details
-
TelnetClientIACFilterer
TelnetClientIACFilterer(Socket socket) throws IOException - Throws:
IOException
-
-
Method Details
-
setEventListener
-
read
public int read()- Specified by:
readin classInputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
fillBuffer
- Throws:
IOException
-
parseCommand
- Throws:
IOException
-
parseSubNegotiation
private int parseSubNegotiation(byte[] buffer, int position, int max) -
parseSubNegotiation
private void parseSubNegotiation(byte option, byte[] additionalData)
-