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.3.20081117
Author:
Daniel.Peintner.EXT@siemens.com, Joerg.Heuer@siemens.com

Constructor Summary
AbstractDecoderChannel()
           
 
Method Summary
 java.lang.String decodeBinaryAsString()
           
 java.lang.String decodeBooleanAsString()
           
 java.util.Calendar decodeDateTime(DatetimeType type)
          Decode Date-Time as sequence of values representing the individual components of the Date-Time.
 java.lang.String decodeDateTimeAsString(DatetimeType type)
           
 java.math.BigDecimal decodeDecimal()
          Decode a decimal represented as a Boolean sign followed by two Unsigned Integers.
 java.lang.String decodeDecimalAsString()
           
 float decodeFloat()
          Decode a Float represented as two consecutive Integers.
 java.lang.String decodeFloatAsString()
           
 int decodeInteger()
          Decode an arbitrary precision integer using a sign bit followed by a sequence of octets.
 java.math.BigInteger decodeIntegerAsBigInteger()
           
 long decodeIntegerAsLong()
           
 java.lang.String decodeIntegerAsString()
           
 java.lang.String decodeNBitUnsignedIntegerAsString(int n)
          Decodes and returns an n-bit unsigned integer as string.
 java.lang.String decodeString()
          Decode a string as a length-prefixed sequence of UCS codepoints, each of which is encoded as an integer.
 java.lang.String decodeStringOnly(int length)
          Decode the characters of a string whose length has already been read.
 int decodeUnsignedInteger()
          Decode an arbitrary precision non negative integer using a sequence of octets.
 java.math.BigInteger decodeUnsignedIntegerAsBigInteger()
           
 long decodeUnsignedIntegerAsLong()
           
 java.lang.String decodeUnsignedIntegerAsString()
           
 
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
decode, decodeBinary, decodeBoolean, decodeNBitUnsignedInteger
 

Constructor Detail

AbstractDecoderChannel

public AbstractDecoderChannel()
Method Detail

decodeBinaryAsString

public java.lang.String decodeBinaryAsString()
                                      throws java.io.IOException
Specified by:
decodeBinaryAsString in interface DecoderChannel
Throws:
java.io.IOException

decodeBooleanAsString

public java.lang.String decodeBooleanAsString()
                                       throws java.io.IOException
Specified by:
decodeBooleanAsString in interface DecoderChannel
Throws:
java.io.IOException

decodeString

public java.lang.String 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 java.lang.String 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

decodeInteger

public int decodeInteger()
                  throws java.io.IOException
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:
decodeInteger in interface DecoderChannel
Throws:
java.io.IOException

decodeIntegerAsLong

public long decodeIntegerAsLong()
                         throws java.io.IOException
Throws:
java.io.IOException

decodeIntegerAsBigInteger

public java.math.BigInteger decodeIntegerAsBigInteger()
                                               throws java.io.IOException
Throws:
java.io.IOException

decodeIntegerAsString

public java.lang.String decodeIntegerAsString()
                                       throws java.io.IOException
Specified by:
decodeIntegerAsString 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

decodeUnsignedIntegerAsLong

public long decodeUnsignedIntegerAsLong()
                                 throws java.io.IOException
Specified by:
decodeUnsignedIntegerAsLong in interface DecoderChannel
Throws:
java.io.IOException

decodeUnsignedIntegerAsBigInteger

public java.math.BigInteger decodeUnsignedIntegerAsBigInteger()
                                                       throws java.io.IOException
Throws:
java.io.IOException

decodeUnsignedIntegerAsString

public java.lang.String decodeUnsignedIntegerAsString()
                                               throws java.io.IOException
Specified by:
decodeUnsignedIntegerAsString in interface DecoderChannel
Throws:
java.io.IOException

decodeNBitUnsignedIntegerAsString

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

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

decodeDecimal

public java.math.BigDecimal decodeDecimal()
                                   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:
decodeDecimal in interface DecoderChannel
Throws:
java.io.IOException

decodeDecimalAsString

public java.lang.String decodeDecimalAsString()
                                       throws java.io.IOException
Specified by:
decodeDecimalAsString in interface DecoderChannel
Throws:
java.io.IOException

decodeFloat

public float decodeFloat()
                  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:
decodeFloat in interface DecoderChannel
Throws:
java.io.IOException

decodeFloatAsString

public java.lang.String decodeFloatAsString()
                                     throws java.io.IOException
Specified by:
decodeFloatAsString in interface DecoderChannel
Throws:
java.io.IOException

decodeDateTime

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

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

decodeDateTimeAsString

public java.lang.String decodeDateTimeAsString(DatetimeType type)
                                        throws java.io.IOException
Specified by:
decodeDateTimeAsString in interface DecoderChannel
Throws:
java.io.IOException

EXIficient