public class BooleanEncodingAlgorithm extends BuiltInEncodingAlgorithm
BuiltInEncodingAlgorithm.WordListener| Modifier and Type | Field and Description |
|---|---|
private static int[] |
BIT_TABLE
Table for setting a particular bit of a byte
|
SPACE_PATTERN| Constructor and Description |
|---|
BooleanEncodingAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertFromCharacters(char[] ch,
int start,
int length) |
void |
convertToCharacters(java.lang.Object data,
java.lang.StringBuffer s) |
java.lang.Object |
decodeFromBytes(byte[] b,
int start,
int length) |
void |
decodeFromBytesToBooleanArray(boolean[] bdata,
int bstart,
int blength,
byte[] b,
int start,
int length) |
java.lang.Object |
decodeFromInputStream(java.io.InputStream s) |
void |
encodeToBytes(java.lang.Object array,
int astart,
int alength,
byte[] b,
int start) |
void |
encodeToBytesFromBooleanArray(boolean[] array,
int astart,
int alength,
byte[] b,
int start) |
void |
encodeToOutputStream(java.lang.Object data,
java.io.OutputStream s) |
private boolean[] |
generateArrayFromList(java.util.List array)
Generate a boolean array from a list of Booleans.
|
int |
getOctetLengthFromPrimitiveLength(int primitiveLength) |
int |
getPrimtiveLengthFromOctetLength(int octetLength) |
int |
getPrimtiveLengthFromOctetLength(int octetLength,
int firstOctet) |
matchWhiteSpaceDelimnatedWords, removeWhitespaceprivate static final int[] BIT_TABLE
public int getPrimtiveLengthFromOctetLength(int octetLength)
throws EncodingAlgorithmException
getPrimtiveLengthFromOctetLength in class BuiltInEncodingAlgorithmEncodingAlgorithmExceptionpublic int getOctetLengthFromPrimitiveLength(int primitiveLength)
getOctetLengthFromPrimitiveLength in class BuiltInEncodingAlgorithmpublic final java.lang.Object decodeFromBytes(byte[] b,
int start,
int length)
throws EncodingAlgorithmException
EncodingAlgorithmExceptionpublic final java.lang.Object decodeFromInputStream(java.io.InputStream s)
throws java.io.IOException
java.io.IOExceptionpublic void encodeToOutputStream(java.lang.Object data,
java.io.OutputStream s)
throws java.io.IOException
java.io.IOExceptionpublic final java.lang.Object convertFromCharacters(char[] ch,
int start,
int length)
public final void convertToCharacters(java.lang.Object data,
java.lang.StringBuffer s)
public int getPrimtiveLengthFromOctetLength(int octetLength,
int firstOctet)
throws EncodingAlgorithmException
EncodingAlgorithmExceptionpublic final void decodeFromBytesToBooleanArray(boolean[] bdata,
int bstart,
int blength,
byte[] b,
int start,
int length)
public void encodeToBytes(java.lang.Object array,
int astart,
int alength,
byte[] b,
int start)
encodeToBytes in class BuiltInEncodingAlgorithmpublic void encodeToBytesFromBooleanArray(boolean[] array,
int astart,
int alength,
byte[] b,
int start)
private boolean[] generateArrayFromList(java.util.List array)
array - The array