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

public abstract Class Alphabet

extends Object
Class Inheritance
Known Direct Subclasses
org.wildfly.common.codec.Base32Alphabet, org.wildfly.common.codec.Base64Alphabet

A base-n encoder/decoder alphabet. Alphabets may be little-endian or big-endian. Each base has its own subclass.

Field Summary

Modifier and TypeField and Description
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
Alphabet(final boolean littleEndian)

Method Summary

Modifier and TypeMethod and Description
public abstract int

Returns:

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

Decode the given code point (character).

public abstract int

Returns:

the Unicode code point
encode
(int
the value
val
)

Encode the given byte value to a code point.

public boolean

Returns:

true if the alphabet is little-endian, false if it is big-endian
isLittleEndian
()

Determine whether this is a little-endian or big-endian alphabet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

littleEndianback to summary
private final boolean littleEndian

Constructor Detail

Alphabetback to summary
pack-priv Alphabet(final boolean littleEndian)

Method Detail

decodeback to summary
public abstract int decode(int codePoint)

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

Parameters
codePoint:int

the Unicode code point

Returns:int

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

encodeback to summary
public abstract int encode(int val)

Encode the given byte value to a code point.

Parameters
val:int

the value

Returns:int

the Unicode code point

isLittleEndianback to summary
public boolean isLittleEndian()

Determine whether this is a little-endian or big-endian alphabet.

Returns:boolean

true if the alphabet is little-endian, false if it is big-endian