EXIficient

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

java.lang.Object
  extended by com.siemens.ct.exi.io.channel.AbstractEncoderChannel
All Implemented Interfaces:
EncoderChannel
Direct Known Subclasses:
BitEncoderChannel, ByteEncoderChannel, ByteEncoderChannelChannelized

public abstract class AbstractEncoderChannel
extends java.lang.Object
implements EncoderChannel

TODO Description

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

Constructor Summary
AbstractEncoderChannel()
           
 
Method Summary
 void encodeBinary(byte[] b)
          Encode a binary value as a length-prefixed sequence of octets.
 void encodeBinary(XSDBase64 b)
           
 void encodeBoolean(XSDBoolean b)
           
 void encodeDateTime(java.util.Calendar cal, DatetimeType type)
          Encode Date-Time as a sequence of values representing the individual components of the Date-Time.
 void encodeDateTime(XSDDatetime datetime)
           
 void encodeDecimal(java.math.BigDecimal decimal)
          Encode a decimal represented as a Boolean sign followed by two Unsigned Integers.
 void encodeDecimal(XSDDecimal decimal)
           
 void encodeFloat(float f)
          Encode a Double represented as two consecutive Integers.
 void encodeFloat(XSDFloat fl)
           
 void encodeInteger(java.math.BigInteger bi)
           
 void encodeInteger(int n)
          Encode an arbitrary precision integer using a sign bit followed by a sequence of octets.
 void encodeInteger(long l)
           
 void encodeInteger(XSDInteger xmlInteger)
           
 void encodeString(java.lang.String s)
          Encode a string as a length-prefixed sequence of UCS codepoints, each of which is encoded as an integer.
 void encodeStringOnly(java.lang.String s)
          Encode a string as a sequence of UCS codepoints, each of which is encoded as an integer.
 void encodeUnsignedInteger(int n)
          Encode an arbitrary precision non negative integer using a sequence of octets.
 void encodeUnsignedInteger(XSDInteger xmlInteger)
           
 int getNumberOfChannelValues()
           
 void incrementValues()
           
 
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.EncoderChannel
encode, encode, encodeBoolean, encodeNBitUnsignedInteger, flush, getOutputStream
 

Constructor Detail

AbstractEncoderChannel

public AbstractEncoderChannel()
Method Detail

incrementValues

public void incrementValues()
Specified by:
incrementValues in interface EncoderChannel

getNumberOfChannelValues

public int getNumberOfChannelValues()
Specified by:
getNumberOfChannelValues in interface EncoderChannel

encodeBinary

public void encodeBinary(byte[] b)
                  throws java.io.IOException
Encode a binary value as a length-prefixed sequence of octets.

Specified by:
encodeBinary in interface EncoderChannel
Throws:
java.io.IOException

encodeBinary

public void encodeBinary(XSDBase64 b)
                  throws java.io.IOException
Specified by:
encodeBinary in interface EncoderChannel
Throws:
java.io.IOException

encodeBoolean

public void encodeBoolean(XSDBoolean b)
                   throws java.io.IOException,
                          java.lang.IllegalArgumentException
Specified by:
encodeBoolean in interface EncoderChannel
Throws:
java.io.IOException
java.lang.IllegalArgumentException

encodeString

public void encodeString(java.lang.String s)
                  throws java.io.IOException
Encode 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:
encodeString in interface EncoderChannel
Throws:
java.io.IOException

encodeStringOnly

public void encodeStringOnly(java.lang.String s)
                      throws java.io.IOException
Description copied from interface: EncoderChannel
Encode a string as a 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:
encodeStringOnly in interface EncoderChannel
Throws:
java.io.IOException

encodeInteger

public void encodeInteger(int n)
                   throws java.io.IOException
Encode 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:
encodeInteger in interface EncoderChannel
Throws:
java.io.IOException

encodeInteger

public void encodeInteger(XSDInteger xmlInteger)
                   throws java.io.IOException
Specified by:
encodeInteger in interface EncoderChannel
Throws:
java.io.IOException

encodeInteger

public void encodeInteger(long l)
                   throws java.io.IOException
Specified by:
encodeInteger in interface EncoderChannel
Throws:
java.io.IOException

encodeInteger

public void encodeInteger(java.math.BigInteger bi)
                   throws java.io.IOException
Specified by:
encodeInteger in interface EncoderChannel
Throws:
java.io.IOException

encodeUnsignedInteger

public void encodeUnsignedInteger(int n)
                           throws java.io.IOException
Encode 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:
encodeUnsignedInteger in interface EncoderChannel
Throws:
java.io.IOException

encodeUnsignedInteger

public void encodeUnsignedInteger(XSDInteger xmlInteger)
                           throws java.io.IOException
Specified by:
encodeUnsignedInteger in interface EncoderChannel
Throws:
java.io.IOException

encodeDecimal

public void encodeDecimal(java.math.BigDecimal decimal)
                   throws java.io.IOException
Encode 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:
encodeDecimal in interface EncoderChannel
Throws:
java.io.IOException

encodeDecimal

public void encodeDecimal(XSDDecimal decimal)
                   throws java.io.IOException,
                          java.lang.RuntimeException
Specified by:
encodeDecimal in interface EncoderChannel
Throws:
java.io.IOException
java.lang.RuntimeException

encodeFloat

public void encodeFloat(float f)
                 throws java.io.IOException
Encode a Double 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:
encodeFloat in interface EncoderChannel
Throws:
java.io.IOException

encodeFloat

public void encodeFloat(XSDFloat fl)
                 throws java.io.IOException
Specified by:
encodeFloat in interface EncoderChannel
Throws:
java.io.IOException

encodeDateTime

public void encodeDateTime(java.util.Calendar cal,
                           DatetimeType type)
                    throws java.io.IOException
Encode Date-Time as a sequence of values representing the individual components of the Date-Time.

Specified by:
encodeDateTime in interface EncoderChannel
Throws:
java.io.IOException

encodeDateTime

public void encodeDateTime(XSDDatetime datetime)
                    throws java.io.IOException
Specified by:
encodeDateTime in interface EncoderChannel
Throws:
java.io.IOException

EXIficient