Interface ActionDecoder.InputPeeker
- Enclosing class:
ActionDecoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for peeking at terminal input without consuming it.
- Author:
- Ståle W. Pedersen
-
Method Summary
Modifier and TypeMethodDescriptionintpeek(long timeoutMs) Peek at the next byte without consuming it.
-
Method Details
-
peek
Peek at the next byte without consuming it.- Parameters:
timeoutMs- timeout in milliseconds- Returns:
- the byte peeked (0-255), -1 for EOF, or -2 for timeout
- Throws:
IOException- if an I/O error occurs
-