com.sun.xml.fastinfoset.algorithm
Class BooleanEncodingAlgorithm
java.lang.Object
com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
com.sun.xml.fastinfoset.algorithm.BooleanEncodingAlgorithm
- All Implemented Interfaces:
- EncodingAlgorithm
public class BooleanEncodingAlgorithm
- extends BuiltInEncodingAlgorithm
An encoder for handling boolean values. Suppports the builtin BOOLEAN encoder.
- Author:
- Alan Hudson, Paul Sandoz
|
Method Summary |
Object |
convertFromCharacters(char[] ch,
int start,
int length)
|
void |
convertToCharacters(Object data,
StringBuffer s)
|
Object |
decodeFromBytes(byte[] b,
int start,
int length)
|
void |
decodeFromBytesToBooleanArray(boolean[] bdata,
int bstart,
int blength,
byte[] b,
int start,
int length)
|
Object |
decodeFromInputStream(InputStream s)
|
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)
|
int |
getOctetLengthFromPrimitiveLength(int primitiveLength)
|
int |
getPrimtiveLengthFromOctetLength(int octetLength)
|
int |
getPrimtiveLengthFromOctetLength(int octetLength,
int firstOctet)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanEncodingAlgorithm
public BooleanEncodingAlgorithm()
getPrimtiveLengthFromOctetLength
public int getPrimtiveLengthFromOctetLength(int octetLength)
throws EncodingAlgorithmException
- Specified by:
getPrimtiveLengthFromOctetLength in class BuiltInEncodingAlgorithm
- Throws:
EncodingAlgorithmException
getOctetLengthFromPrimitiveLength
public int getOctetLengthFromPrimitiveLength(int primitiveLength)
- Specified by:
getOctetLengthFromPrimitiveLength in class BuiltInEncodingAlgorithm
decodeFromBytes
public final Object decodeFromBytes(byte[] b,
int start,
int length)
throws EncodingAlgorithmException
- Throws:
EncodingAlgorithmException
decodeFromInputStream
public final Object decodeFromInputStream(InputStream s)
throws IOException
- Throws:
IOException
encodeToOutputStream
public void encodeToOutputStream(Object data,
OutputStream s)
throws IOException
- Throws:
IOException
convertFromCharacters
public final Object convertFromCharacters(char[] ch,
int start,
int length)
convertToCharacters
public final void convertToCharacters(Object data,
StringBuffer s)
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
public void encodeToBytes(Object array,
int astart,
int alength,
byte[] b,
int start)
- Specified by:
encodeToBytes in class BuiltInEncodingAlgorithm
encodeToBytesFromBooleanArray
public void encodeToBytesFromBooleanArray(boolean[] array,
int astart,
int alength,
byte[] b,
int start)
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.