Package org.apache.commons.codec.binary
Class BaseNCodec.AbstractBuilder<T,B extends BaseNCodec.AbstractBuilder<T,B>>
java.lang.Object
org.apache.commons.codec.binary.BaseNCodec.AbstractBuilder<T,B>
- Type Parameters:
T
- the codec type to build.B
- the codec builder subtype.
- All Implemented Interfaces:
Supplier<T>
- Direct Known Subclasses:
Base32.Builder
,Base64.Builder
- Enclosing class:
BaseNCodec
public abstract static class BaseNCodec.AbstractBuilder<T,B extends BaseNCodec.AbstractBuilder<T,B>>
extends Object
implements Supplier<T>
Builds
Base64
instances.- Since:
- 1.17.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CodecPolicy
private final byte[]
private byte[]
private int
private byte[]
private byte
Padding byte. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) B
asThis()
(package private) CodecPolicy
(package private) byte[]
(package private) int
(package private) byte[]
(package private) byte
setDecodingPolicy
(CodecPolicy decodingPolicy) Sets the decoding policy.setEncodeTable
(byte... encodeTable) Sets the encode table.setLineLength
(int lineLength) Sets the line length.setLineSeparator
(byte... lineSeparator) Sets the line separator.setPadding
(byte padding) Sets the padding byte.
-
Field Details
-
decodingPolicy
-
lineLength
private int lineLength -
lineSeparator
private byte[] lineSeparator -
defaultEncodeTable
private final byte[] defaultEncodeTable -
encodeTable
private byte[] encodeTable -
padding
private byte paddingPadding byte.
-
-
Constructor Details
-
AbstractBuilder
AbstractBuilder(byte[] defaultEncodeTable)
-
-
Method Details
-
asThis
B asThis() -
getDecodingPolicy
CodecPolicy getDecodingPolicy() -
getEncodeTable
byte[] getEncodeTable() -
getLineLength
int getLineLength() -
getLineSeparator
byte[] getLineSeparator() -
getPadding
byte getPadding() -
setDecodingPolicy
Sets the decoding policy.- Parameters:
decodingPolicy
- the decoding policy, null resets to the default.- Returns:
this
instance.
-
setEncodeTable
Sets the encode table.- Parameters:
encodeTable
- the encode table, null resets to the default.- Returns:
this
instance.
-
setLineLength
Sets the line length.- Parameters:
lineLength
- the line length, less than 0 resets to the default.- Returns:
this
instance.
-
setLineSeparator
Sets the line separator.- Parameters:
lineSeparator
- the line separator, null resets to the default.- Returns:
this
instance.
-
setPadding
Sets the padding byte.- Parameters:
padding
- the padding byte.- Returns:
this
instance.
-