Top Description Fields Constructors Methods
org.wildfly.common.codec

public abstract Class Base64Alphabet

extends Alphabet
Class Inheritance
Imports
org.wildfly.common.iteration.ByteIterator, .CodePointIterator

A base-64 alphabet.
See Also
ByteIterator#base64Encode(Base64Alphabet), CodePointIterator#base64Decode(Base64Alphabet)

Field Summary

Modifier and TypeField and Description
public static final Base64Alphabet
STANDARD

The standard RFC 4648 base-64 alphabet.

Constructor Summary

AccessConstructor and Description
protected
Base64Alphabet(final boolean
true if the alphabet is little-endian (LSB first), false otherwise
littleEndian
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public abstract int

Returns:

the decoded 6-bit value or -1 if the code point is not valid
decode
(int
the code point
codePoint
)

Implements abstract org.wildfly.common.codec.Alphabet.decode.

Decode the given code point.
public abstract int

Returns:

the Unicode code point
encode
(int
the 6-bit value
val
)

Implements abstract org.wildfly.common.codec.Alphabet.encode.

Encode the given 6-bit value to a code point.
Inherited from org.wildfly.common.codec.Alphabet:
isLittleEndian

Field Detail

STANDARDback to summary
public static final Base64Alphabet STANDARD

The standard RFC 4648 base-64 alphabet.

Constructor Detail

Base64Alphabetback to summary
protected Base64Alphabet(final boolean littleEndian)

Construct a new instance.

Parameters
littleEndian:boolean

true if the alphabet is little-endian (LSB first), false otherwise

Method Detail

decodeback to summary
public abstract int decode(int codePoint)

Implements abstract org.wildfly.common.codec.Alphabet.decode.

Decode the given code point. If the code point is not valid, -1 is returned.

Parameters
codePoint:int

the code point

Returns:int

the decoded 6-bit value or -1 if the code point is not valid

encodeback to summary
public abstract int encode(int val)

Implements abstract org.wildfly.common.codec.Alphabet.encode.

Encode the given 6-bit value to a code point.

Parameters
val:int

the 6-bit value

Returns:int

the Unicode code point