EXIficient

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

java.lang.Object
  extended by com.siemens.ct.exi.io.channel.AbstractEncoderChannel
      extended by com.siemens.ct.exi.io.channel.ByteEncoderChannelChannelized
All Implemented Interfaces:
EncoderChannel, EncoderChannelChannelized

public final class ByteEncoderChannelChannelized
extends AbstractEncoderChannel
implements EncoderChannelChannelized

TODO Description

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

Constructor Summary
ByteEncoderChannelChannelized()
          Construct a byte aligned encoder from output stream.
 
Method Summary
 void encode(byte[] b, int off, int len)
           
 void encode(int b)
           
 void encodeBoolean(boolean b)
          Encode a single boolean value.
 void encodeNBitUnsignedInteger(int b, int n)
          Encode n-bit unsigned integer using the minimum number of bytes required to store n bits.
 void flush()
           
 java.io.OutputStream getOutputStream()
           
 byte[] toByteArray()
           
 
Methods inherited from class com.siemens.ct.exi.io.channel.AbstractEncoderChannel
encodeBinary, encodeBinary, encodeBoolean, encodeDateTime, encodeDateTime, encodeDecimal, encodeDecimal, encodeFloat, encodeFloat, encodeInteger, encodeInteger, encodeInteger, encodeInteger, encodeString, encodeStringOnly, encodeUnsignedInteger, encodeUnsignedInteger, getNumberOfChannelValues, 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
encodeBinary, encodeBinary, encodeBoolean, encodeDateTime, encodeDateTime, encodeDecimal, encodeDecimal, encodeFloat, encodeFloat, encodeInteger, encodeInteger, encodeInteger, encodeInteger, encodeString, encodeStringOnly, encodeUnsignedInteger, encodeUnsignedInteger, getNumberOfChannelValues, incrementValues
 

Constructor Detail

ByteEncoderChannelChannelized

public ByteEncoderChannelChannelized()
Construct a byte aligned encoder from output stream.

Method Detail

flush

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

encode

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

encode

public void encode(byte[] b,
                   int off,
                   int len)
            throws java.io.IOException
Specified by:
encode in interface EncoderChannel
Throws:
java.io.IOException

encodeBoolean

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

Specified by:
encodeBoolean in interface EncoderChannel
Throws:
java.io.IOException
java.lang.IllegalArgumentException

encodeNBitUnsignedInteger

public void encodeNBitUnsignedInteger(int b,
                                      int n)
                               throws java.io.IOException
Encode n-bit unsigned integer using the minimum number of bytes required to store n bits. The n least significant bits of parameter b starting with the most significant, i.e. from left to right.

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

toByteArray

public byte[] toByteArray()
                   throws java.io.IOException
Specified by:
toByteArray in interface EncoderChannelChannelized
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
Specified by:
getOutputStream in interface EncoderChannel

EXIficient