Class 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 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 - Thrown 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.