public class Base16 extends BaseNCodec
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.
DECODING_POLICY_DEFAULT, lineLength, MASK_8BITS, MIME_CHUNK_SIZE, pad, PAD, PAD_DEFAULT, PEM_CHUNK_SIZE
Constructor and Description |
---|
Base16()
Creates a Base16 codec used for decoding and encoding.
|
Base16(boolean lowerCase)
Creates a Base16 codec used for decoding and encoding.
|
Base16(boolean lowerCase,
CodecPolicy decodingPolicy)
Creates a Base16 codec used for decoding and encoding.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isInAlphabet(byte octet)
Returns whether or not the
octet is in the Base16 alphabet. |
containsAlphabetOrPad, decode, decode, decode, encode, encode, encode, encodeAsString, encodeToString, ensureBufferSize, getChunkSeparator, getCodecPolicy, getDefaultBufferSize, getEncodedLength, isInAlphabet, isInAlphabet, isStrictDecoding, isWhiteSpace
public Base16()
public Base16(boolean lowerCase)
lowerCase
- if true
then use a lower-case Base16 alphabet.public Base16(boolean lowerCase, CodecPolicy decodingPolicy)
lowerCase
- if true
then use a lower-case Base16 alphabet.decodingPolicy
- Decoding policy.public boolean isInAlphabet(byte octet)
octet
is in the Base16 alphabet.isInAlphabet
in class BaseNCodec
octet
- The value to test.true
if the value is defined in the the Base16 alphabet false
otherwise.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.