Package org.apache.commons.codec.binary
Class Base16
java.lang.Object
org.apache.commons.codec.binary.BaseNCodec
org.apache.commons.codec.binary.Base16
- All Implemented Interfaces:
- BinaryDecoder,- BinaryEncoder,- Decoder,- Encoder
Provides Base32 encoding and decoding as defined by RFC 4648 - 8. Base 16 Encoding.
 
This class is thread-safe.
 This implementation strictly follows RFC 4648, and as such unlike the Base32 and Base64 implementations, it does not ignore invalid alphabet
 characters or whitespace, neither does it offer chunking or padding characters.
 
The only additional feature above those specified in RFC 4648 is support for working with a lower-case alphabet in addition to the default upper-case alphabet.
- Since:
- 1.15
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.codec.binary.BaseNCodecBaseNCodec.AbstractBuilder<T,B extends BaseNCodec.AbstractBuilder<T, B>> 
- 
Field SummaryFields inherited from class org.apache.commons.codec.binary.BaseNCodecDECODING_POLICY_DEFAULT, lineLength, MASK_8BITS, MIME_CHUNK_SIZE, pad, PAD, PAD_DEFAULT, PEM_CHUNK_SIZE
- 
Constructor SummaryConstructorsConstructorDescriptionBase16()Constructs a Base16 codec used for decoding and encoding.Base16(boolean lowerCase) Constructs a Base16 codec used for decoding and encoding.Base16(boolean lowerCase, CodecPolicy decodingPolicy) Constructs a Base16 codec used for decoding and encoding.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisInAlphabet(byte octet) Returns whether or not theoctetis in the Base16 alphabet.Methods inherited from class org.apache.commons.codec.binary.BaseNCodeccontainsAlphabetOrPad, decode, decode, decode, encode, encode, encode, encodeAsString, encodeToString, ensureBufferSize, getChunkSeparator, getCodecPolicy, getDefaultBufferSize, getEncodedLength, isInAlphabet, isInAlphabet, isStrictDecoding, isWhiteSpace
- 
Constructor Details- 
Base16public Base16()Constructs a Base16 codec used for decoding and encoding.
- 
Base16Constructs a Base16 codec used for decoding and encoding.- Parameters:
- lowerCase- if- truethen use a lower-case Base16 alphabet.
 
- 
Base16Constructs a Base16 codec used for decoding and encoding.- Parameters:
- lowerCase- if- truethen use a lower-case Base16 alphabet.
- decodingPolicy- Decoding policy.
 
 
- 
- 
Method Details- 
isInAlphabetReturns whether or not theoctetis in the Base16 alphabet.- Specified by:
- isInAlphabetin class- BaseNCodec
- Parameters:
- octet- The value to test.
- Returns:
- trueif the value is defined in the Base16 alphabet- falseotherwise.
 
 
-