Package org.apache.commons.compress.utils

# Class ByteUtils.InputStreamByteSupplier

java.lang.Object
org.apache.commons.compress.utils.ByteUtils.InputStreamByteSupplier

All Implemented Interfaces:
  `ByteUtils.ByteSupplier`

Enclosing class:
  ByteUtils

public static class ByteUtils.InputStreamByteSupplier extends Object implements ByteUtils.ByteSupplier
`ByteUtils.ByteSupplier` based on `InputStream`.

Since:
  1.14

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InputStreamByteSupplier(InputStream is)`

- ## Method Summary

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

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### InputStreamByteSupplier

    public InputStreamByteSupplier(InputStream is)

- ## Method Details

  - ### getAsByte

    public int getAsByte() throws IOException
    Description copied from interface: `ByteUtils.ByteSupplier`
    The contract is similar to `InputStream.read()`, return the byte as an unsigned int, -1 if there are no more bytes.
    Specified by:
      `getAsByte` in interface `ByteUtils.ByteSupplier`
    Returns:
      the supplied byte or -1 if there are no more bytes
    Throws:
      `IOException` - if supplying fails