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.
BaseNCodec.ContextCHUNK_SEPARATOR, DECODING_POLICY_DEFAULT, lineLength, MASK_8BITS, MIME_CHUNK_SIZE, pad, PAD, PAD_DEFAULT, PEM_CHUNK_SIZE| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
decode(byte[] data,
int offset,
int length,
BaseNCodec.Context context) |
void |
encode(byte[] data,
int offset,
int length,
BaseNCodec.Context context) |
boolean |
isInAlphabet(byte octet)
Returns whether or not the
octet is in the Base16 alphabet. |
containsAlphabetOrPad, decode, decode, decodeObject, encode, encode, encodeAsString, encodeObject, encodeToString, ensureBufferSize, getDefaultBufferSize, getEncodedLength, isInAlphabet, isInAlphabet, isStrictDecoding, isWhiteSpacepublic 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 void decode(byte[] data,
int offset,
int length,
BaseNCodec.Context context)
decode 在类中 BaseNCodecpublic void encode(byte[] data,
int offset,
int length,
BaseNCodec.Context context)
encode 在类中 BaseNCodecpublic boolean isInAlphabet(byte octet)
octet is in the Base16 alphabet.isInAlphabet 在类中 BaseNCodecoctet - The value to test.true if the value is defined in the the Base16 alphabet false otherwise.Copyright © 2022. All rights reserved.