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
public class ShortEncodingAlgorithm extends IntegerEncodingAlgorithm
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_SIZE
-
Fields inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
SPACE_PATTERN
-
-
Constructor Summary
Constructors Constructor Description ShortEncodingAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectconvertFromCharacters(char[] ch, int start, int length)voidconvertToCharacters(Object data, StringBuffer s)voidconvertToCharactersFromShortArray(short[] sdata, StringBuffer s)ObjectdecodeFromBytes(byte[] b, int start, int length)voiddecodeFromBytesToShortArray(short[] sdata, int istart, byte[] b, int start, int length)ObjectdecodeFromInputStream(InputStream s)short[]decodeFromInputStreamToShortArray(InputStream s)voidencodeToBytes(Object array, int astart, int alength, byte[] b, int start)voidencodeToBytesFromShortArray(short[] sdata, int istart, int ilength, byte[] b, int start)voidencodeToOutputStream(Object data, OutputStream s)voidencodeToOutputStreamFromShortArray(short[] idata, OutputStream s)short[]generateArrayFromList(List array)intgetOctetLengthFromPrimitiveLength(int primitiveLength)intgetPrimtiveLengthFromOctetLength(int octetLength)-
Methods inherited from class com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithm
matchWhiteSpaceDelimnatedWords, removeWhitespace
-
-
-
-
Method Detail
-
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
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)
-
decodeFromBytesToShortArray
public final void decodeFromBytesToShortArray(short[] sdata, int istart, byte[] b, int start, int length)
-
decodeFromInputStreamToShortArray
public final short[] decodeFromInputStreamToShortArray(InputStream s) throws IOException
- Throws:
IOException
-
encodeToOutputStreamFromShortArray
public final void encodeToOutputStreamFromShortArray(short[] idata, OutputStream s) throws IOException- Throws:
IOException
-
encodeToBytes
public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start)
- Specified by:
encodeToBytesin classBuiltInEncodingAlgorithm
-
encodeToBytesFromShortArray
public final void encodeToBytesFromShortArray(short[] sdata, int istart, int ilength, byte[] b, int start)
-
convertToCharactersFromShortArray
public final void convertToCharactersFromShortArray(short[] sdata, StringBuffer s)
-
generateArrayFromList
public final short[] generateArrayFromList(List array)
-
-