Used to encode strings Huffman encoding.
Characters are encoded with ISO-8859-1, if any multi-byte characters or
control characters are present the encoder will throw EncodingException.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| private static void | encode(final int[][]
The table to encode by table, ByteBuffer The buffer to encode to buffer, String The string to encode s)
|
| public static void | encodeLowerCase(ByteBuffer
the buffer to encode into in lowercase. buffer, String the string to encode. s)
|
| public static int | Returns: the number of octets needed to encode the string, or -1 if it cannot be encoded.the string to encode. s)
|
| public static int | Returns: the number of octets needed to encode the bytes, or -1 if it cannot be encoded.the byte array to encode. b)
|
| private static int | |
| public static int | Returns: the number of octets needed to encode the string, or -1 if it cannot be encoded.the string to encode in lowercase. s)
|
| HuffmanEncoder | back to summary |
|---|---|
| private HuffmanEncoder() | |
| encode | back to summary |
|---|---|
public static void encode(ByteBuffer buffer, String s)
| |
| encode | back to summary |
|---|---|
private static void encode(final int[][] table, ByteBuffer buffer, String s)
| |
| encodeLowerCase | back to summary |
|---|---|
public static void encodeLowerCase(ByteBuffer buffer, String s)
| |
| octetsNeeded | back to summary |
|---|---|
public static int octetsNeeded(String s)
| |
| octetsNeeded | back to summary |
|---|---|
public static int octetsNeeded(byte[] b)
| |
| octetsNeeded | back to summary |
|---|---|
| private static int octetsNeeded(final int[][] table, String s) | |
| octetsNeededLowerCase | back to summary |
|---|---|
public static int octetsNeededLowerCase(String s)
| |