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

Package org.apache.commons.codec.binary

# Class Base16.Builder

java.lang.Object
org.apache.commons.codec.binary.BaseNCodec.AbstractBuilder<Base16,Base16.Builder>
org.apache.commons.codec.binary.Base16.Builder

All Implemented Interfaces:
  `Supplier<Base16>`

Enclosing class:
  `Base16`

public static class Base16.Builder extends BaseNCodec.AbstractBuilder<Base16,Base16.Builder>
Builds `Base16` instances.

To configure a new instance, use a `Base16.Builder`. For example:

     Base16 Base16 = Base16.builder()
       .setDecodingPolicy(DecodingPolicy.LENIENT) // default is lenient
       .get()

Since:
  1.20.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Base16`
  `get()`
  `Base16.Builder`
  `setEncodeTable(byte... encodeTable)`
  Sets the Base16 encode table and derives the matching decode table.
  `Base16.Builder`
  `setLowerCase(boolean lowerCase)`
  Sets whether to use the lower-case Base16 alphabet.

  ### Methods inherited from class org.apache.commons.codec.binary.BaseNCodec.AbstractBuilder

  `setDecodeTable, setDecodingPolicy, setLineLength, setLineSeparator, setPadding`

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

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

- ## Constructor Details

  - ### Builder

    public Builder()
    Constructs a new instance.

- ## Method Details

  - ### get

    public Base16 get()

  - ### setEncodeTable

    public Base16.Builder setEncodeTable(byte... encodeTable)
    Sets the Base16 encode table and derives the matching decode table.
    Overrides:
      `setEncodeTable` in class `BaseNCodec.AbstractBuilder<Base16,Base16.Builder>`
    Parameters:
      `encodeTable` - 16 unique bytes, null resets to the default upper-case table.
    Returns:
      `this` instance.
    Throws:
      `IllegalArgumentException` - if `encodeTable` does not contain 16 unique bytes.

  - ### setLowerCase

    public Base16.Builder setLowerCase(boolean lowerCase)
    Sets whether to use the lower-case Base16 alphabet.
    Parameters:
      `lowerCase` - `true` to use the lower-case Base16 alphabet.
    Returns:
      `this` instance.