Module com.sun.xml.fastinfoset
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 com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
BuiltInEncodingAlgorithm.WordListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[]
Table for setting a particular bit of a byteFields inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
SPACE_PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object
convertFromCharacters
(char[] ch, int start, int length) final void
convertToCharacters
(Object data, StringBuilder s) final Object
decodeFromBytes
(byte[] b, int start, int length) final void
decodeFromBytesToBooleanArray
(boolean[] bdata, int bstart, int blength, byte[] b, int start, int length) final Object
void
encodeToBytes
(Object array, int astart, int alength, byte[] b, int start) void
encodeToBytesFromBooleanArray
(boolean[] array, int astart, int alength, byte[] b, int start) void
encodeToOutputStream
(Object data, OutputStream s) private boolean[]
generateArrayFromList
(List<Boolean> array) Generate a boolean array from a list of Booleans.int
getOctetLengthFromPrimitiveLength
(int primitiveLength) int
getPrimtiveLengthFromOctetLength
(int octetLength) int
getPrimtiveLengthFromOctetLength
(int octetLength, int firstOctet) Methods inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
matchWhiteSpaceDelimnatedWords, removeWhitespace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jvnet.fastinfoset.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:
getPrimtiveLengthFromOctetLength
in classBuiltInEncodingAlgorithm
- Throws:
EncodingAlgorithmException
-
getOctetLengthFromPrimitiveLength
public int getOctetLengthFromPrimitiveLength(int primitiveLength) - Specified by:
getOctetLengthFromPrimitiveLength
in 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:
encodeToBytes
in classBuiltInEncodingAlgorithm
-
encodeToBytesFromBooleanArray
public void encodeToBytesFromBooleanArray(boolean[] array, int astart, int alength, byte[] b, int start) -
generateArrayFromList
Generate a boolean array from a list of Booleans.- Parameters:
array
- The array
-