EXIficient

com.siemens.ct.exi.io.channel
Interface EncoderChannel

All Known Implementing Classes:
AbstractEncoderChannel, BitEncoderChannel, ByteEncoderChannel

public interface EncoderChannel

TODO Description

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

Method Summary
 void align()
          Align to next byte-aligned boundary in the stream if it is not already at such a boundary
 void encode(byte[] b, int off, int len)
           
 void encode(int b)
           
 void encodeBigInteger(java.math.BigInteger bi)
           
 void encodeBinary(byte[] b)
          Encode a binary value as a length-prefixed sequence of octets.
 void encodeBoolean(boolean b)
          Encode a single boolean value.
 void encodeBoolean(XSDBoolean b)
           
 void encodeDateTime(java.util.Calendar cal, DatetimeType type)
           
 void encodeDateTime(XSDDatetime cal)
           
 void encodeDecimal(java.math.BigDecimal decimal)
          Encode a decimal represented as a Boolean sign followed by two Unsigned Integers.
 void encodeDecimal(boolean negative, java.math.BigInteger integral, java.math.BigInteger reverseFraction)
           
 void encodeDouble(double d)
           
 void encodeDouble(long mantissa, long exponent)
           
 void encodeFloat(float f)
          Encode a Double represented as two consecutive Integers.
 void encodeFloat(int mantissa, int exponent)
           
 void encodeInteger(int n)
          Encode an arbitrary precision integer using a sign bit followed by a sequence of octets.
 void encodeLong(long l)
           
 void encodeNBitUnsignedInteger(int b, int n)
           
 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 encodeUnsignedBigInteger(java.math.BigInteger bi)
           
 void encodeUnsignedInteger(int n)
          Encode an arbitrary precision non negative integer using a sequence of octets.
 void encodeUnsignedLong(long l)
           
 void flush()
           
 java.io.OutputStream getOutputStream()
           
 

Method Detail

getOutputStream

java.io.OutputStream getOutputStream()

flush

void flush()
           throws java.io.IOException
Throws:
java.io.IOException

align

void align()
           throws java.io.IOException
Align to next byte-aligned boundary in the stream if it is not already at such a boundary

Throws:
java.io.IOException

encode

void encode(int b)
            throws java.io.IOException
Throws:
java.io.IOException

encode

void encode(byte[] b,
            int off,
            int len)
            throws java.io.IOException
Throws:
java.io.IOException

encodeNBitUnsignedInteger

void encodeNBitUnsignedInteger(int b,
                               int n)
                               throws java.io.IOException
Throws:
java.io.IOException

encodeBoolean

void encodeBoolean(boolean b)
                   throws java.io.IOException
Encode a single boolean value. A false value is encoded as bit (byte) 0 and true value is encode as bit (byte) 1.

Throws:
java.io.IOException

encodeBoolean

void encodeBoolean(XSDBoolean b)
                   throws java.io.IOException
Throws:
java.io.IOException

encodeBinary

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

Throws:
java.io.IOException

encodeString

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.

Throws:
java.io.IOException

encodeStringOnly

void encodeStringOnly(java.lang.String s)
                      throws java.io.IOException
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.

Throws:
java.io.IOException

encodeUnsignedInteger

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.

Throws:
java.io.IOException

encodeUnsignedLong

void encodeUnsignedLong(long l)
                        throws java.io.IOException
Throws:
java.io.IOException

encodeUnsignedBigInteger

void encodeUnsignedBigInteger(java.math.BigInteger bi)
                              throws java.io.IOException
Throws:
java.io.IOException

encodeInteger

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.

Throws:
java.io.IOException

encodeLong

void encodeLong(long l)
                throws java.io.IOException
Throws:
java.io.IOException

encodeBigInteger

void encodeBigInteger(java.math.BigInteger bi)
                      throws java.io.IOException
Throws:
java.io.IOException

encodeDecimal

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.

Throws:
java.io.IOException

encodeDecimal

void encodeDecimal(boolean negative,
                   java.math.BigInteger integral,
                   java.math.BigInteger reverseFraction)
                   throws java.io.IOException
Throws:
java.io.IOException

encodeFloat

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

Throws:
java.io.IOException

encodeFloat

void encodeFloat(int mantissa,
                 int exponent)
                 throws java.io.IOException
Throws:
java.io.IOException

encodeDouble

void encodeDouble(double d)
                  throws java.io.IOException
Throws:
java.io.IOException

encodeDouble

void encodeDouble(long mantissa,
                  long exponent)
                  throws java.io.IOException
Throws:
java.io.IOException

encodeDateTime

void encodeDateTime(java.util.Calendar cal,
                    DatetimeType type)
                    throws java.io.IOException
Throws:
java.io.IOException

encodeDateTime

void encodeDateTime(XSDDatetime cal)
                    throws java.io.IOException
Throws:
java.io.IOException

EXIficient