Interface ByteUtils.ByteSupplier

Enclosing class:
ByteUtils
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 ByteUtils.ByteSupplier
Used to supply bytes.
Since:
1.14
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The contract is similar to InputStream.read(), return the byte as an unsigned int, -1 if there are no more bytes.
  • Method Details

    • getAsByte

      int getAsByte() throws IOException
      The contract is similar to InputStream.read(), return the byte as an unsigned int, -1 if there are no more bytes.
      Returns:
      the supplied byte or -1 if there are no more bytes
      Throws:
      IOException - if supplying fails