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

public abstract Class Base32Alphabet

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

A base-32 alphabet.
See Also
ByteIterator#base32Encode(Base32Alphabet), CodePointIterator#base32Decode(Base32Alphabet)

Field Summary

Modifier and TypeField and Description
public static final Base32Alphabet
LOWERCASE

The standard RFC 4648 base-32 alphabet mapped to lowercase.

public static final Base32Alphabet
STANDARD

The standard RFC 4648 base-32 alphabet.

Constructor Summary

AccessConstructor and Description
protected
Base32Alphabet(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 5-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 5-bit value
val
)

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

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

Field Detail

LOWERCASEback to summary
public static final Base32Alphabet LOWERCASE

The standard RFC 4648 base-32 alphabet mapped to lowercase.

STANDARDback to summary
public static final Base32Alphabet STANDARD

The standard RFC 4648 base-32 alphabet.

Constructor Detail

Base32Alphabetback to summary
protected Base32Alphabet(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 5-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 5-bit value to a code point.

Parameters
val:int

the 5-bit value

Returns:int

the Unicode code point