Class Base32.Builder
java.lang.Object
org.apache.commons.codec.binary.BaseNCodec.AbstractBuilder<Base32, Base32.Builder>
org.apache.commons.codec.binary.Base32.Builder
- Enclosing class:
Base32
Builds
Base32 instances.
To configure a new instance, use a Base32.Builder. For example:
Base32 base32 = Base32.builder()
.setDecodingPolicy(DecodingPolicy.LENIENT) // default is lenient
.setLineLength(0) // default is none
.setLineSeparator('\r', '\n') // default is CR LF
.setPadding('=') // default is '='
.setEncodeTable(customEncodeTable) // default is RFC 4648 Section 6, Table 3: The Base 32 Alphabet
.get()
- Since:
- 1.17.0
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Constructs a new instance using RFC 4648 Section 6, Table 3: The Base 32 Alphabet. -
Method Summary
Modifier and TypeMethodDescriptionget()setEncodeTable(byte... encodeTable) Sets the encode table.setHexDecodeTable(boolean useHex) Sets the decode table to use Base32 hexadecimal iftrue, otherwise use the Base32 alphabet.setHexEncodeTable(boolean useHex) Sets the encode table to use Base32 hexadecimal iftrue, otherwise use the Base32 alphabet.Methods inherited from class BaseNCodec.AbstractBuilder
setDecodeTable, setDecodingPolicy, setLineLength, setLineSeparator, setPadding
-
Constructor Details
-
Builder
public Builder()Constructs a new instance using RFC 4648 Section 6, Table 3: The Base 32 Alphabet.
-
-
Method Details
-
get
-
setEncodeTable
Description copied from class:BaseNCodec.AbstractBuilderSets the encode table.- Overrides:
setEncodeTablein classBaseNCodec.AbstractBuilder<Base32, Base32.Builder>- Parameters:
encodeTable- the encode table, null resets to the default.- Returns:
thisinstance.
-
setHexDecodeTable
Sets the decode table to use Base32 hexadecimal iftrue, otherwise use the Base32 alphabet.This overrides a value previously set with
setEncodeTable(byte...).- Parameters:
useHex- use Base32 hexadecimal iftrue, otherwise use the Base32 alphabet.- Returns:
thisinstance.- Since:
- 1.18.0
-
setHexEncodeTable
Sets the encode table to use Base32 hexadecimal iftrue, otherwise use the Base32 alphabet.This overrides a value previously set with
setEncodeTable(byte...).- Parameters:
useHex-- If true, then use RFC 4648 Section 7, Table 4: Base 32 Encoding with Extended Hex Alphabet
- If false, then use RFC 4648 Section 6, Table 3: The Base 32 Alphabet
- Returns:
thisinstance.- Since:
- 1.18.0
-