Class ShortEncodingAlgorithm
java.lang.Object
com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
com.sun.xml.fastinfoset.algorithm.IntegerEncodingAlgorithm
com.sun.xml.fastinfoset.algorithm.ShortEncodingAlgorithm
- All Implemented Interfaces:
EncodingAlgorithm
An encoder for handling Short values. Suppports the builtin SHORT encoder.
- Author:
- Alan Hudson, Paul Sandoz
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
BuiltInEncodingAlgorithm.WordListener -
Field Summary
Fields inherited from class com.sun.xml.fastinfoset.algorithm.IntegerEncodingAlgorithm
INT_MAX_CHARACTER_SIZE, INT_SIZE, LONG_MAX_CHARACTER_SIZE, LONG_SIZE, SHORT_MAX_CHARACTER_SIZE, SHORT_SIZEFields inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
SPACE_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ObjectconvertFromCharacters(char[] ch, int start, int length) final voidconvertToCharacters(Object data, StringBuffer s) final voidconvertToCharactersFromShortArray(short[] sdata, StringBuffer s) final ObjectdecodeFromBytes(byte[] b, int start, int length) final voiddecodeFromBytesToShortArray(short[] sdata, int istart, byte[] b, int start, int length) final Objectfinal short[]final voidencodeToBytes(Object array, int astart, int alength, byte[] b, int start) final voidencodeToBytesFromShortArray(short[] sdata, int istart, int ilength, byte[] b, int start) voidencodeToOutputStream(Object data, OutputStream s) final voidencodeToOutputStreamFromShortArray(short[] idata, OutputStream s) final short[]generateArrayFromList(List array) intgetOctetLengthFromPrimitiveLength(int primitiveLength) final intgetPrimtiveLengthFromOctetLength(int octetLength) Methods inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
matchWhiteSpaceDelimnatedWords, removeWhitespace
-
Constructor Details
-
ShortEncodingAlgorithm
public ShortEncodingAlgorithm()
-
-
Method Details
-
getPrimtiveLengthFromOctetLength
public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException - 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
-
decodeFromBytesToShortArray
public final void decodeFromBytesToShortArray(short[] sdata, int istart, byte[] b, int start, int length) -
decodeFromInputStreamToShortArray
- Throws:
IOException
-
encodeToOutputStreamFromShortArray
public final void encodeToOutputStreamFromShortArray(short[] idata, OutputStream s) throws IOException - Throws:
IOException
-
encodeToBytes
- Specified by:
encodeToBytesin classBuiltInEncodingAlgorithm
-
encodeToBytesFromShortArray
public final void encodeToBytesFromShortArray(short[] sdata, int istart, int ilength, byte[] b, int start) -
convertToCharactersFromShortArray
-
generateArrayFromList
-