EXIficient

com.siemens.ct.exi.io.channel
Class AbstractDecoderChannel

java.lang.Object
  extended by com.siemens.ct.exi.io.channel.AbstractDecoderChannel
All Implemented Interfaces:
DecoderChannel
Direct Known Subclasses:
BitDecoderChannel, ByteDecoderChannel

public abstract class AbstractDecoderChannel
extends java.lang.Object
implements DecoderChannel

TODO Description

Version:
0.4.20081117
Author:
Daniel.Peintner.EXT@siemens.com, Joerg.Heuer@siemens.com

Constructor Summary
AbstractDecoderChannel()
           
 
Method Summary
 BooleanValue decodeBooleanValue()
           
 DateTimeValue decodeDateTimeValue(DatetimeType type)
          Decode Date-Time as sequence of values representing the individual components of the Date-Time.
 DecimalValue decodeDecimalValue()
          Decode a decimal represented as a Boolean sign followed by two Unsigned Integers.
 DoubleValue decodeDoubleValue()
           
 FloatValue decodeFloatValue()
          Decode a Float represented as two consecutive Integers.
 HugeIntegerValue decodeHugeIntegerValue()
           
 IntegerValue decodeIntegerValue()
          Decode an arbitrary precision integer using a sign bit followed by a sequence of octets.
 LongValue decodeLongValue()
           
 IntegerValue decodeNBitUnsignedIntegerValue(int n)
          Decodes and returns an n-bit unsigned integer as string.
 char[] decodeString()
          Decode a string as a length-prefixed sequence of UCS codepoints, each of which is encoded as an integer.
 char[] decodeStringOnly(int length)
          Decode the characters of a string whose length has already been read.
 HugeIntegerValue decodeUnsignedHugeIntegerValue()
           
 int decodeUnsignedInteger()
          Decode an arbitrary precision non negative integer using a sequence of octets.
 IntegerValue decodeUnsignedIntegerValue()
           
 LongValue decodeUnsignedLongValue()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.siemens.ct.exi.io.channel.DecoderChannel
align, decode, decodeBinary, decodeBoolean, decodeNBitUnsignedInteger
 

Constructor Detail

AbstractDecoderChannel

public AbstractDecoderChannel()
Method Detail

decodeBooleanValue

public BooleanValue decodeBooleanValue()
                                throws java.io.IOException
Specified by:
decodeBooleanValue in interface DecoderChannel
Throws:
java.io.IOException

decodeString

public char[] decodeString()
                    throws java.io.IOException
Decode a string as a length-prefixed sequence of UCS codepoints, each of which is encoded as an integer. Look for codepoints of more than 16 bits that are represented as UTF-16 surrogate pairs in Java.

Specified by:
decodeString in interface DecoderChannel
Throws:
java.io.IOException

decodeStringOnly

public char[] decodeStringOnly(int length)
                        throws java.io.IOException
Decode the characters of a string whose length has already been read. Look for codepoints of more than 16 bits that are represented as UTF-16 surrogate pairs in Java.

Specified by:
decodeStringOnly in interface DecoderChannel
Parameters:
length - Length of the character sequence to read.
Returns:
The character sequence as a string.
Throws:
java.io.IOException

decodeIntegerValue

public IntegerValue decodeIntegerValue()
                                throws java.io.IOException
Description copied from interface: DecoderChannel
Decode an arbitrary precision integer using a sign bit followed by a sequence of octets. The most significant bit of the last octet is set to zero to indicate sequence termination. Only seven bits per octet are used to store the integer's value.

Specified by:
decodeIntegerValue in interface DecoderChannel
Throws:
java.io.IOException

decodeLongValue

public LongValue decodeLongValue()
                          throws java.io.IOException
Specified by:
decodeLongValue in interface DecoderChannel
Throws:
java.io.IOException

decodeHugeIntegerValue

public HugeIntegerValue decodeHugeIntegerValue()
                                        throws java.io.IOException
Specified by:
decodeHugeIntegerValue in interface DecoderChannel
Throws:
java.io.IOException

decodeUnsignedHugeIntegerValue

public HugeIntegerValue decodeUnsignedHugeIntegerValue()
                                                throws java.io.IOException
Specified by:
decodeUnsignedHugeIntegerValue in interface DecoderChannel
Throws:
java.io.IOException

decodeUnsignedInteger

public int decodeUnsignedInteger()
                          throws java.io.IOException
Decode an arbitrary precision non negative integer using a sequence of octets. The most significant bit of the last octet is set to zero to indicate sequence termination. Only seven bits per octet are used to store the integer's value.

Specified by:
decodeUnsignedInteger in interface DecoderChannel
Throws:
java.io.IOException

decodeUnsignedIntegerValue

public IntegerValue decodeUnsignedIntegerValue()
                                        throws java.io.IOException
Specified by:
decodeUnsignedIntegerValue in interface DecoderChannel
Throws:
java.io.IOException

decodeUnsignedLongValue

public LongValue decodeUnsignedLongValue()
                                  throws java.io.IOException
Specified by:
decodeUnsignedLongValue in interface DecoderChannel
Throws:
java.io.IOException

decodeNBitUnsignedIntegerValue

public IntegerValue decodeNBitUnsignedIntegerValue(int n)
                                            throws java.io.IOException
Decodes and returns an n-bit unsigned integer as string.

Specified by:
decodeNBitUnsignedIntegerValue in interface DecoderChannel
Throws:
java.io.IOException

decodeDecimalValue

public DecimalValue decodeDecimalValue()
                                throws java.io.IOException
Decode a decimal represented as a Boolean sign followed by two Unsigned Integers. A sign value of zero (0) is used to represent positive Decimal values and a sign value of one (1) is used to represent negative Decimal values The first Integer represents the integral portion of the Decimal value. The second positive integer represents the fractional portion of the decimal with the digits in reverse order to preserve leading zeros.

Specified by:
decodeDecimalValue in interface DecoderChannel
Throws:
java.io.IOException

decodeFloatValue

public FloatValue decodeFloatValue()
                            throws java.io.IOException
Decode a Float represented as two consecutive Integers. The first Integer represents the mantissa of the floating point number and the second Integer represents the 10-based exponent of the floating point number

Specified by:
decodeFloatValue in interface DecoderChannel
Throws:
java.io.IOException

decodeDoubleValue

public DoubleValue decodeDoubleValue()
                              throws java.io.IOException
Specified by:
decodeDoubleValue in interface DecoderChannel
Throws:
java.io.IOException

decodeDateTimeValue

public DateTimeValue decodeDateTimeValue(DatetimeType type)
                                  throws java.io.IOException
Decode Date-Time as sequence of values representing the individual components of the Date-Time.

Specified by:
decodeDateTimeValue in interface DecoderChannel
Throws:
java.io.IOException

EXIficient