Class BooleanEncodingAlgorithm
java.lang.Object
com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
com.sun.xml.fastinfoset.algorithm.BooleanEncodingAlgorithm
- All Implemented Interfaces:
EncodingAlgorithm
An encoder for handling boolean values. Supports the builtin BOOLEAN encoder.
-
Nested Class Summary
Nested classes/interfaces inherited from class BuiltInEncodingAlgorithm
BuiltInEncodingAlgorithm.WordListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[]Table for setting a particular bit of a byteFields inherited from class BuiltInEncodingAlgorithm
SPACE_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ObjectconvertFromCharacters(char[] ch, int start, int length) final voidconvertToCharacters(Object data, StringBuilder s) final ObjectdecodeFromBytes(byte[] b, int start, int length) final voiddecodeFromBytesToBooleanArray(boolean[] bdata, int bstart, int blength, byte[] b, int start, int length) final ObjectvoidencodeToBytes(Object array, int astart, int alength, byte[] b, int start) voidencodeToBytesFromBooleanArray(boolean[] array, int astart, int alength, byte[] b, int start) voidencodeToOutputStream(Object data, OutputStream s) private boolean[]generateArrayFromList(List<Boolean> array) Generate a boolean array from a list of Booleans.intgetOctetLengthFromPrimitiveLength(int primitiveLength) intgetPrimtiveLengthFromOctetLength(int octetLength) intgetPrimtiveLengthFromOctetLength(int octetLength, int firstOctet) Methods inherited from class BuiltInEncodingAlgorithm
matchWhiteSpaceDelimnatedWords, removeWhitespaceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EncodingAlgorithm
convertToCharacters
-
Field Details
-
BIT_TABLE
private static final int[] BIT_TABLETable for setting a particular bit of a byte
-
-
Constructor Details
-
BooleanEncodingAlgorithm
public BooleanEncodingAlgorithm()
-
-
Method Details
-
getPrimtiveLengthFromOctetLength
- Specified by:
getPrimtiveLengthFromOctetLengthin classBuiltInEncodingAlgorithm- Throws:
EncodingAlgorithmException
-
getOctetLengthFromPrimitiveLength
public int getOctetLengthFromPrimitiveLength(int primitiveLength) - Specified by:
getOctetLengthFromPrimitiveLengthin classBuiltInEncodingAlgorithm
-
decodeFromBytes
public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException - Throws:
EncodingAlgorithmException
-
decodeFromInputStream
- Throws:
IOException
-
encodeToOutputStream
- Throws:
IOException
-
convertFromCharacters
-
convertToCharacters
-
getPrimtiveLengthFromOctetLength
public int getPrimtiveLengthFromOctetLength(int octetLength, int firstOctet) throws EncodingAlgorithmException - Throws:
EncodingAlgorithmException
-
decodeFromBytesToBooleanArray
public final void decodeFromBytesToBooleanArray(boolean[] bdata, int bstart, int blength, byte[] b, int start, int length) -
encodeToBytes
- Specified by:
encodeToBytesin classBuiltInEncodingAlgorithm
-
encodeToBytesFromBooleanArray
public void encodeToBytesFromBooleanArray(boolean[] array, int astart, int alength, byte[] b, int start) -
generateArrayFromList
-