Base16OutputStream (Apache Commons Codec 1.22.1 API)
Description: declaration: package: org.apache.commons.codec.binary, class: Base16OutputStream

Package org.apache.commons.codec.binary

# Class Base16OutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.codec.binary.BaseNCodecOutputStream<Base16,Base16OutputStream,Base16OutputStream.Builder>
org.apache.commons.codec.binary.Base16OutputStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `AutoCloseable`

public class Base16OutputStream extends BaseNCodecOutputStream<Base16,Base16OutputStream,Base16OutputStream.Builder>
Provides Base16 encoding in a streaming fashion (unlimited size).

The default behavior of the Base16OutputStream is to ENCODE, whereas the default behavior of the `Base16InputStream` is to DECODE. But this behavior can be overridden by using a different constructor.

Since:
  1.15
See Also:
  - `Base16`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Base16OutputStream.Builder`
  Builds instances of Base16InputStream.

  ## Nested classes/interfaces inherited from class org.apache.commons.codec.binary.BaseNCodecOutputStream

  `BaseNCodecOutputStream.AbstractBuilder<T,C extends BaseNCodec,B extends BaseNCodecOutputStream.AbstractBuilder<T,C,B>>`

- ## Field Summary

  ### Fields inherited from class java.io.FilterOutputStream

  `out`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Base16OutputStream(OutputStream outputStream)`
  Constructs a Base16OutputStream such that all data written is Base16-encoded to the original provided OutputStream.
  `Base16OutputStream(OutputStream outputStream, boolean encode)`
  Deprecated.
  Use `builder()` and `Base16OutputStream.Builder`.
  `Base16OutputStream(OutputStream outputStream, boolean encode, boolean lowerCase)`
  Deprecated.
  Use `builder()` and `Base16OutputStream.Builder`.
  `Base16OutputStream(OutputStream outputStream, boolean encode, boolean lowerCase, CodecPolicy decodingPolicy)`
  Deprecated.
  Use `builder()` and `Base16OutputStream.Builder`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Base16OutputStream.Builder`
  `builder()`
  Constructs a new Builder.

  ### Methods inherited from class org.apache.commons.codec.binary.BaseNCodecOutputStream

  `close, eof, flush, isStrictDecoding, write, write`

  ### Methods inherited from class java.io.FilterOutputStream

  `write`

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

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

- ## Constructor Details

  - ### Base16OutputStream

    public Base16OutputStream(OutputStream outputStream)
    Constructs a Base16OutputStream such that all data written is Base16-encoded to the original provided OutputStream.
    Parameters:
      `outputStream` - OutputStream to wrap.

  - ### Base16OutputStream

    @Deprecated public Base16OutputStream(OutputStream outputStream, boolean encode)
    Deprecated.
    Use `builder()` and `Base16OutputStream.Builder`.
    Constructs a Base16OutputStream such that all data written is either Base16-encoded or Base16-decoded to the original provided OutputStream.
    Parameters:
      `outputStream` - OutputStream to wrap.
      `encode` - true if we should encode all data written to us, false if we should decode.

  - ### Base16OutputStream

    @Deprecated public Base16OutputStream(OutputStream outputStream, boolean encode, boolean lowerCase)
    Deprecated.
    Use `builder()` and `Base16OutputStream.Builder`.
    Constructs a Base16OutputStream such that all data written is either Base16-encoded or Base16-decoded to the original provided OutputStream.
    Parameters:
      `outputStream` - OutputStream to wrap.
      `encode` - true if we should encode all data written to us, false if we should decode.
      `lowerCase` - if `true` then use a lower-case Base16 alphabet.

  - ### Base16OutputStream

    @Deprecated public Base16OutputStream(OutputStream outputStream, boolean encode, boolean lowerCase, CodecPolicy decodingPolicy)
    Deprecated.
    Use `builder()` and `Base16OutputStream.Builder`.
    Constructs a Base16OutputStream such that all data written is either Base16-encoded or Base16-decoded to the original provided OutputStream.
    Parameters:
      `outputStream` - OutputStream to wrap.
      `encode` - true if we should encode all data written to us, false if we should decode.
      `lowerCase` - if `true` then use a lower-case Base16 alphabet.
      `decodingPolicy` - Decoding policy.

- ## Method Details

  - ### builder

    public static Base16OutputStream.Builder builder()
    Constructs a new Builder.
    Returns:
      A new Builder.