Class ArrayTerminalDataStream
java.lang.Object
org.springframework.shell.test.jediterm.terminal.ArrayTerminalDataStream
- All Implemented Interfaces:
TerminalDataStream
- Direct Known Subclasses:
TtyBasedArrayDataStream
Takes data from underlying char array.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.test.jediterm.terminal.TerminalDataStream
TerminalDataStream.EOF
-
Field Summary
-
Constructor Summary
ConstructorDescriptionArrayTerminalDataStream
(char[] buf) ArrayTerminalDataStream
(char[] buf, int offset, int length) -
Method Summary
Modifier and TypeMethodDescriptionchar
getChar()
boolean
isEmpty()
void
pushBackBuffer
(char[] bytes, int length) void
pushChar
(char c) readNonControlCharacters
(int maxChars)
-
Field Details
-
buf
protected char[] buf -
offset
protected int offset -
length
protected int length
-
-
Constructor Details
-
ArrayTerminalDataStream
public ArrayTerminalDataStream(char[] buf, int offset, int length) -
ArrayTerminalDataStream
public ArrayTerminalDataStream(char[] buf)
-
-
Method Details
-
getChar
- Specified by:
getChar
in interfaceTerminalDataStream
- Throws:
IOException
-
pushChar
- Specified by:
pushChar
in interfaceTerminalDataStream
- Throws:
TerminalDataStream.EOF
-
readNonControlCharacters
- Specified by:
readNonControlCharacters
in interfaceTerminalDataStream
- Throws:
IOException
-
pushBackBuffer
- Specified by:
pushBackBuffer
in interfaceTerminalDataStream
- Throws:
TerminalDataStream.EOF
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceTerminalDataStream
-