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:
Base16.Builder,Base32.Builder,Base58.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 byte[]private CodecPolicyprivate final byte[]private intprivate byte[]private intprivate byte[]private bytePadding byte.private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) BasThis()Returns this instance typed as the subclass typeB.(package private) byte[](package private) CodecPolicy(package private) int(package private) byte[](package private) int(package private) byte[](package private) byte(package private) intsetDecodeTable(byte[] decodeTable) Sets the decode table.(package private) BsetDecodeTableRaw(byte[] decodeTable) Sets the decode table.setDecodingPolicy(CodecPolicy decodingPolicy) Sets the decoding policy.(package private) BsetEncodedBlockSize(int encodedBlockSize) Sets the encoded block size, subclasses normally set this on construction.setEncodeTable(byte... encodeTable) Sets the encode table.(package private) BsetEncodeTableRaw(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.(package private) BsetUnencodedBlockSize(int unencodedBlockSize) Sets the unencoded block size, subclasses normally set this on construction.
-
Field Details
-
unencodedBlockSize
private int unencodedBlockSize -
encodedBlockSize
private int encodedBlockSize -
decodingPolicy
-
lineLength
private int lineLength -
lineSeparator
private byte[] lineSeparator -
defaultEncodeTable
private final byte[] defaultEncodeTable -
encodeTable
private byte[] encodeTable -
decodeTable
private byte[] decodeTable -
padding
private byte paddingPadding byte.
-
-
Constructor Details
-
AbstractBuilder
AbstractBuilder(byte[] defaultEncodeTable)
-
-
Method Details
-
asThis
B asThis()Returns this instance typed as the subclass typeB.This is the same as the expression:
(B) this
- Returns:
thisinstance typed as the subclass typeB.
-
getDecodeTable
byte[] getDecodeTable() -
getDecodingPolicy
CodecPolicy getDecodingPolicy() -
getEncodedBlockSize
int getEncodedBlockSize() -
getEncodeTable
byte[] getEncodeTable() -
getLineLength
int getLineLength() -
getLineSeparator
byte[] getLineSeparator() -
getPadding
byte getPadding() -
getUnencodedBlockSize
int getUnencodedBlockSize() -
setDecodeTable
Sets the decode table.- Parameters:
decodeTable- the decode table.- Returns:
thisinstance.- Since:
- 1.20.0
-
setDecodeTableRaw
Sets the decode table.- Parameters:
decodeTable- the decode table, null resets to the default.- Returns:
thisinstance.
-
setDecodingPolicy
Sets the decoding policy.- Parameters:
decodingPolicy- the decoding policy, null resets to the default.- Returns:
thisinstance.
-
setEncodedBlockSize
Sets the encoded block size, subclasses normally set this on construction.- Parameters:
encodedBlockSize- the encoded block size, subclasses normally set this on construction.- Returns:
thisinstance.
-
setEncodeTable
Sets the encode table.- Parameters:
encodeTable- the encode table, null resets to the default.- Returns:
thisinstance.
-
setEncodeTableRaw
Sets the encode table.- Parameters:
encodeTable- the encode table, null resets to the default.- Returns:
thisinstance.
-
setLineLength
Sets the line length.- Parameters:
lineLength- the line length, less than 0 resets to the default.- Returns:
thisinstance.
-
setLineSeparator
Sets the line separator.- Parameters:
lineSeparator- the line separator, null resets to the default.- Returns:
thisinstance.
-
setPadding
Sets the padding byte.- Parameters:
padding- the padding byte.- Returns:
thisinstance.
-
setUnencodedBlockSize
Sets the unencoded block size, subclasses normally set this on construction.- Parameters:
unencodedBlockSize- the unencoded block size, subclasses normally set this on construction.- Returns:
thisinstance.
-