EXIficient

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

java.lang.Object
  extended by com.siemens.ct.exi.io.channel.AbstractDecoderChannel
      extended by com.siemens.ct.exi.io.channel.ByteDecoderChannel
All Implemented Interfaces:
DecoderChannel

public class ByteDecoderChannel
extends AbstractDecoderChannel
implements DecoderChannel

TODO Description

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

Constructor Summary
ByteDecoderChannel(java.io.InputStream istream)
           
 
Method Summary
 void align()
          Align to next byte-aligned boundary in the stream if it is not already at such a boundary
 int decode()
          Decodes a single byte
 BinaryValue decodeBinary()
          Decode a binary value as a length-prefixed sequence of octets.
 boolean decodeBoolean()
          Decode a single boolean value.
 int decodeNBitUnsignedInteger(int n)
          Decodes and returns an n-bit unsigned integer using the minimum number of bytes required for n bits.
 java.io.InputStream getInputStream()
           
 
Methods inherited from class com.siemens.ct.exi.io.channel.AbstractDecoderChannel
decodeBooleanValue, decodeDateTimeValue, decodeDecimalValue, decodeDoubleValue, decodeFloatValue, decodeHugeIntegerValue, decodeIntegerValue, decodeLongValue, decodeNBitUnsignedIntegerValue, decodeString, decodeStringOnly, decodeUnsignedHugeIntegerValue, decodeUnsignedInteger, decodeUnsignedIntegerValue, decodeUnsignedLongValue
 
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
decodeBooleanValue, decodeDateTimeValue, decodeDecimalValue, decodeDoubleValue, decodeFloatValue, decodeHugeIntegerValue, decodeIntegerValue, decodeLongValue, decodeNBitUnsignedIntegerValue, decodeString, decodeStringOnly, decodeUnsignedHugeIntegerValue, decodeUnsignedInteger, decodeUnsignedIntegerValue, decodeUnsignedLongValue
 

Constructor Detail

ByteDecoderChannel

public ByteDecoderChannel(java.io.InputStream istream)
Method Detail

getInputStream

public java.io.InputStream getInputStream()

decode

public int decode()
           throws java.io.IOException
Description copied from interface: DecoderChannel
Decodes a single byte

Specified by:
decode in interface DecoderChannel
Returns:
a byte as int
Throws:
java.io.IOException

align

public void align()
           throws java.io.IOException
Description copied from interface: DecoderChannel
Align to next byte-aligned boundary in the stream if it is not already at such a boundary

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

decodeBoolean

public boolean decodeBoolean()
                      throws java.io.IOException
Decode a single boolean value. The value false is represented by the byte 0, and the value true is represented by the byte 1.

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

decodeBinary

public BinaryValue decodeBinary()
                         throws java.io.IOException
Decode a binary value as a length-prefixed sequence of octets.

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

decodeNBitUnsignedInteger

public int decodeNBitUnsignedInteger(int n)
                              throws java.io.IOException
Decodes and returns an n-bit unsigned integer using the minimum number of bytes required for n bits.

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

EXIficient