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.

@FunctionalInterface public static interface ActionDecoder.InputPeeker
Functional interface for peeking at terminal input without consuming it.
Author:
Ståle W. Pedersen
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    peek(long timeoutMs)
    Peek at the next byte without consuming it.
  • Method Details

    • peek

      int peek(long timeoutMs) throws IOException
      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