Package org.cryptacular.codec
Class Base64Decoder
java.lang.Object
org.cryptacular.codec.AbstractBaseNDecoder
org.cryptacular.codec.Base64Decoder
- All Implemented Interfaces:
Decoder
Stateful base 64 decoder with support for line breaks.
- Author:
- Middleware Services
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for base-64 decoders. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance that decodes base 64-encoded input in the default character set.Base64Decoder
(boolean urlSafe) Creates a new instance that decodes base 64-encoded input in the optional URL-safe character set.Base64Decoder
(String alphabet) Creates a new instance that decodes base-64 character data encoded in the given alphabet. -
Method Summary
Methods inherited from class org.cryptacular.codec.AbstractBaseNDecoder
decode, decodingTable, finalize, isPaddedInput, outputSize, setPaddedInput
-
Constructor Details
-
Base64Decoder
public Base64Decoder()Creates a new instance that decodes base 64-encoded input in the default character set. -
Base64Decoder
public Base64Decoder(boolean urlSafe) Creates a new instance that decodes base 64-encoded input in the optional URL-safe character set.- Parameters:
urlSafe
- True to use URL and filesystem-safe character set, false otherwise.
-
Base64Decoder
Creates a new instance that decodes base-64 character data encoded in the given alphabet.- Parameters:
alphabet
- Base-64 alphabet to use for decoding
-
-
Method Details
-
getBlockLength
protected int getBlockLength()- Specified by:
getBlockLength
in classAbstractBaseNDecoder
- Returns:
- Number of bits in a block of encoded characters.
-
getBitsPerChar
protected int getBitsPerChar()- Specified by:
getBitsPerChar
in classAbstractBaseNDecoder
- Returns:
- Number of bits encoding a single character.
-