Package org.apache.commons.compress.utils

# Class ByteUtils.OutputStreamByteConsumer

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

All Implemented Interfaces:
  `ByteUtils.ByteConsumer`

Enclosing class:
  `ByteUtils`

public static class ByteUtils.OutputStreamByteConsumer extends Object implements ByteUtils.ByteConsumer
`ByteUtils.ByteConsumer` based on `OutputStream`.

Since:
  1.14

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OutputStreamByteConsumer(OutputStream os)`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `accept(int b)`
  The contract is similar to `OutputStream.write(int)`, consume the lower eight bytes of the int as a byte.

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

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

- ## Constructor Details

  - ### OutputStreamByteConsumer

    public OutputStreamByteConsumer(OutputStream os)
    Constructs a new instance.
    Parameters:
      `os` - an output stream.

- ## Method Details

  - ### accept

    public void accept(int b) throws IOException
    Description copied from interface: `ByteUtils.ByteConsumer`
    The contract is similar to `OutputStream.write(int)`, consume the lower eight bytes of the int as a byte.
    Specified by:
      `accept` in interface `ByteUtils.ByteConsumer`
    Parameters:
      `b` - the byte to consume
    Throws:
      `IOException` - if consuming fails