Class Base64.Builder
java.lang.Object
org.apache.commons.codec.binary.BaseNCodec.AbstractBuilder<Base64, Base64.Builder>
org.apache.commons.codec.binary.Base64.Builder
- Enclosing class:
Base64
Builds
Base64 instances.
To configure a new instance, use a Base64.Builder. For example:
Base64 base64 = Base64.builder()
.setDecodingPolicy(DecodingPolicy.LENIENT) // default is lenient, null resets to default
.setEncodeTable(customEncodeTable) // default is built in, null resets to default
.setLineLength(0) // default is none
.setLineSeparator('\r', '\n') // default is CR LF, null resets to default
.setPadding('=') // default is '='
.setUrlSafe(false) // default is false
.get()
- Since:
- 1.17.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()setEncodeTable(byte... encodeTable) Sets the encode table.setUrlSafe(boolean urlSafe) Sets the URL-safe encoding policy.Methods inherited from class BaseNCodec.AbstractBuilder
setDecodeTable, setDecodingPolicy, setLineLength, setLineSeparator, setPadding
-
Constructor Details
-
Builder
public Builder()Constructs a new instance.
-
-
Method Details
-
get
-
setEncodeTable
Description copied from class:BaseNCodec.AbstractBuilderSets the encode table.- Overrides:
setEncodeTablein classBaseNCodec.AbstractBuilder<Base64, Base64.Builder>- Parameters:
encodeTable- the encode table, null resets to the default.- Returns:
thisinstance.
-
setUrlSafe
Sets the URL-safe encoding policy.- Parameters:
urlSafe- URL-safe encoding policy, null resets to the default.- Returns:
thisinstance.
-