EXIficient

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

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

public class BitEncoderChannel
extends AbstractEncoderChannel
implements EncoderChannel

TODO Description

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

Constructor Summary
BitEncoderChannel(java.io.OutputStream ostream)
          Construct an 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.
 void flush()
          Flush underlying bit output stream.
 java.io.OutputStream getOutputStream()
           
 
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

BitEncoderChannel

public BitEncoderChannel(java.io.OutputStream ostream)
Construct an encoder from output stream.

Method Detail

getOutputStream

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

flush

public void flush()
           throws java.io.IOException
Flush underlying bit output stream.

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

encodeNBitUnsignedInteger

public void encodeNBitUnsignedInteger(int b,
                                      int n)
                               throws java.io.IOException
Encode n-bit unsigned integer. 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

encodeBoolean

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

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

EXIficient