org.universAAL.lddi.lib.ieeex73std.org.bn.coders.per
Class PERAlignedDecoder

Package class diagram package PERAlignedDecoder
java.lang.Object
  extended by org.universAAL.lddi.lib.ieeex73std.org.bn.coders.Decoder
      extended by org.universAAL.lddi.lib.ieeex73std.org.bn.coders.per.PERAlignedDecoder
All Implemented Interfaces:
IASN1TypesDecoder, IDecoder
Direct Known Subclasses:
PERUnalignedDecoder

public class PERAlignedDecoder
extends Decoder


Constructor Summary
PERAlignedDecoder()
           
 
Method Summary
<T> T
decode(InputStream stream, Class<T> objectClass)
          Decode object from stream
 DecodedObject decodeAny(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeBitString(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeBoolean(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeChoice(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
protected  int decodeConstraintLengthDeterminant(int min, int max, BitArrayInputStream stream)
          Decode the constraint length determinant.
protected  long decodeConstraintNumber(long min, long max, BitArrayInputStream stream)
          Decode of the constrained whole number ITU-T X.691. 10.5.
 DecodedObject decodeEnumItem(DecodedObject decodedTag, Class objectClass, Class enumClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeInteger(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
protected  long decodeIntegerValueAsBytes(int intLen, InputStream stream)
           
protected  int decodeLength(ElementInfo elementInfo, InputStream stream)
           
protected  int decodeLengthDeterminant(BitArrayInputStream stream)
          Decode the length determinant ITU-T X.691. 10.9.
protected  int decodeNormallySmallNumber(BitArrayInputStream stream)
          Decode the normally small number ITU-T X.691. 10.6 NOTE � (Tutorial) This procedure is used when encoding a non-negative whole number that is expected to be small, but whose size is potentially unlimited due to the presence of an extension marker.
 DecodedObject decodeNull(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeObjectIdentifier(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeOctetString(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeReal(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
protected  int decodeSemiConstraintNumber(int min, BitArrayInputStream stream)
          Decode the semi-constrained whole number ITU-T X.691. 10.7.
 DecodedObject decodeSequence(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeSequenceOf(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeString(DecodedObject decodedTag, Class objectClass, ElementInfo elementInfo, InputStream stream)
           
 DecodedObject decodeTag(InputStream stream)
           
protected  int decodeUnconstraintNumber(BitArrayInputStream stream)
          Decode the unconstrained whole number ITU-T X.691. 10.8.
protected  int getSequencePreambleBitLen(Class objectClass, ElementInfo elementInfo)
           
protected  void skipAlignedBits(InputStream stream)
           
 
Methods inherited from class org.universAAL.lddi.lib.ieeex73std.org.bn.coders.Decoder
createInstanceForElement, createSequenceFieldInfo, decodeBoxedType, decodeClassType, decodeElement, decodeEnum, decodeJavaElement, decodePreparedElement, decodeSequenceField, initDefaultValues, invokeSelectMethodForField, invokeSetterMethodForField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PERAlignedDecoder

public PERAlignedDecoder()
Method Detail

decode

public <T> T decode(InputStream stream,
                    Class<T> objectClass)
         throws Exception
Description copied from interface: IDecoder
Decode object from stream

Specified by:
decode in interface IDecoder
Overrides:
decode in class Decoder
Parameters:
stream - Input stream
objectClass - Class for object
Returns:
Created object from stream
Throws:
Exception

decodeTag

public DecodedObject decodeTag(InputStream stream)
                        throws Exception
Throws:
Exception

skipAlignedBits

protected void skipAlignedBits(InputStream stream)

decodeIntegerValueAsBytes

protected long decodeIntegerValueAsBytes(int intLen,
                                         InputStream stream)
                                  throws Exception
Throws:
Exception

decodeConstraintLengthDeterminant

protected int decodeConstraintLengthDeterminant(int min,
                                                int max,
                                                BitArrayInputStream stream)
                                         throws Exception
Decode the constraint length determinant. ITU-T X.691. 10.9. General rules for encoding a length determinant

Throws:
Exception

decodeLengthDeterminant

protected int decodeLengthDeterminant(BitArrayInputStream stream)
                               throws IOException
Decode the length determinant ITU-T X.691. 10.9. General rules for encoding a length determinant

Throws:
IOException

decodeConstraintNumber

protected long decodeConstraintNumber(long min,
                                      long max,
                                      BitArrayInputStream stream)
                               throws Exception
Decode of the constrained whole number ITU-T X.691. 10.5. NOTE � (Tutorial) This subclause is referenced by other clauses, and itself references earlier clauses for the production of a nonnegative-binary-integer or a 2's-complement-binary-integer encoding.

Throws:
Exception

decodeSemiConstraintNumber

protected int decodeSemiConstraintNumber(int min,
                                         BitArrayInputStream stream)
                                  throws Exception
Decode the semi-constrained whole number ITU-T X.691. 10.7. NOTE � (Tutorial) This procedure is used when a lower bound can be identified but not an upper bound. The encoding procedure places the offset from the lower bound into the minimum number of octets as a non-negative-binary-integer, and requires an explicit length encoding (typically a single octet) as specified in later procedures.

Throws:
Exception

decodeNormallySmallNumber

protected int decodeNormallySmallNumber(BitArrayInputStream stream)
                                 throws Exception
Decode the normally small number ITU-T X.691. 10.6 NOTE � (Tutorial) This procedure is used when encoding a non-negative whole number that is expected to be small, but whose size is potentially unlimited due to the presence of an extension marker. An example is a choice index.

Throws:
Exception

decodeUnconstraintNumber

protected int decodeUnconstraintNumber(BitArrayInputStream stream)
                                throws Exception
Decode the unconstrained whole number ITU-T X.691. 10.8. NOTE � (Tutorial) This case only arises in the encoding of the value of an integer type with no lower bound. The procedure encodes the value as a 2's-complement-binary-integer into the minimum number of octets required to accommodate the encoding, and requires an explicit length encoding (typically a single octet) as specified in later procedures.

Throws:
Exception

decodeLength

protected int decodeLength(ElementInfo elementInfo,
                           InputStream stream)
                    throws Exception
Throws:
Exception

decodeChoice

public DecodedObject decodeChoice(DecodedObject decodedTag,
                                  Class objectClass,
                                  ElementInfo elementInfo,
                                  InputStream stream)
                           throws Exception
Specified by:
decodeChoice in interface IASN1TypesDecoder
Overrides:
decodeChoice in class Decoder
Throws:
Exception

getSequencePreambleBitLen

protected int getSequencePreambleBitLen(Class objectClass,
                                        ElementInfo elementInfo)
                                 throws Exception
Throws:
Exception

decodeSequence

public DecodedObject decodeSequence(DecodedObject decodedTag,
                                    Class objectClass,
                                    ElementInfo elementInfo,
                                    InputStream stream)
                             throws Exception
Specified by:
decodeSequence in interface IASN1TypesDecoder
Overrides:
decodeSequence in class Decoder
Throws:
Exception

decodeEnumItem

public DecodedObject decodeEnumItem(DecodedObject decodedTag,
                                    Class objectClass,
                                    Class enumClass,
                                    ElementInfo elementInfo,
                                    InputStream stream)
                             throws Exception
Throws:
Exception

decodeBoolean

public DecodedObject decodeBoolean(DecodedObject decodedTag,
                                   Class objectClass,
                                   ElementInfo elementInfo,
                                   InputStream stream)
                            throws Exception
Throws:
Exception

decodeAny

public DecodedObject decodeAny(DecodedObject decodedTag,
                               Class objectClass,
                               ElementInfo elementInfo,
                               InputStream stream)
                        throws Exception
Throws:
Exception

decodeNull

public DecodedObject decodeNull(DecodedObject decodedTag,
                                Class objectClass,
                                ElementInfo elementInfo,
                                InputStream stream)
                         throws Exception
Throws:
Exception

decodeInteger

public DecodedObject decodeInteger(DecodedObject decodedTag,
                                   Class objectClass,
                                   ElementInfo elementInfo,
                                   InputStream stream)
                            throws Exception
Throws:
Exception

decodeReal

public DecodedObject decodeReal(DecodedObject decodedTag,
                                Class objectClass,
                                ElementInfo elementInfo,
                                InputStream stream)
                         throws Exception
Throws:
Exception

decodeOctetString

public DecodedObject decodeOctetString(DecodedObject decodedTag,
                                       Class objectClass,
                                       ElementInfo elementInfo,
                                       InputStream stream)
                                throws Exception
Throws:
Exception

decodeBitString

public DecodedObject decodeBitString(DecodedObject decodedTag,
                                     Class objectClass,
                                     ElementInfo elementInfo,
                                     InputStream stream)
                              throws Exception
Throws:
Exception

decodeString

public DecodedObject decodeString(DecodedObject decodedTag,
                                  Class objectClass,
                                  ElementInfo elementInfo,
                                  InputStream stream)
                           throws Exception
Throws:
Exception

decodeSequenceOf

public DecodedObject decodeSequenceOf(DecodedObject decodedTag,
                                      Class objectClass,
                                      ElementInfo elementInfo,
                                      InputStream stream)
                               throws Exception
Throws:
Exception

decodeObjectIdentifier

public DecodedObject decodeObjectIdentifier(DecodedObject decodedTag,
                                            Class objectClass,
                                            ElementInfo elementInfo,
                                            InputStream stream)
                                     throws Exception
Throws:
Exception


Copyright © 2014 universAAL Consortium. All Rights Reserved.