org.universAAL.lddi.lib.ieeex73std.mder
Class EncoderMDER<T>

Package class diagram package EncoderMDER
java.lang.Object
  extended by org.universAAL.lddi.lib.ieeex73std.org.bn.coders.Encoder<T>
      extended by org.universAAL.lddi.lib.ieeex73std.mder.EncoderMDER<T>
All Implemented Interfaces:
IASN1TypesEncoder, IEncoder<T>

public class EncoderMDER<T>
extends Encoder<T>


Constructor Summary
EncoderMDER()
           
 
Method Summary
 void encode(T object, OutputStream os)
          Encode object
 int encodeAny(Object object, OutputStream stream, ElementInfo elementInfo)
          Two fields: - Length in octets of the next field (INT_U16) - Encoding of selected value (m octets)
 int encodeBitString(Object object, OutputStream stream, ElementInfo elementInfo)
          Three types of BitString: - 8 bits - 16 bits - 32 bits We only have to extract the length in bytes of the BitString
 int encodeBoolean(Object object, OutputStream stream, ElementInfo elementInfo)
           
 int encodeChoice(Object object, OutputStream stream, ElementInfo elementInfo)
           
 int encodeEnumItem(Object enumConstant, Class enumClass, OutputStream stream, ElementInfo elementInfo)
           
 int encodeInteger(Object object, OutputStream stream, ElementInfo elementInfo)
           
 int encodeNull(Object object, OutputStream stream, ElementInfo elementInfo)
           
 int encodeObjectIdentifier(Object object, OutputStream steam, ElementInfo elementInfo)
           
 int encodeOctetString(Object object, OutputStream stream, ElementInfo elementInfo)
          Two types of OctetString: - fixed-length (size constrained) - variable length (has an extra U-16 Integer as a length field) and then the octets.
 int encodeReal(Object object, OutputStream steam, ElementInfo elementInfo)
           
 int encodeSequence(Object object, OutputStream stream, ElementInfo elementInfo)
           
 int encodeSequenceOf(Object object, OutputStream stream, ElementInfo elementInfo)
          Group of elements of the same type.
 int encodeString(Object object, OutputStream steam, ElementInfo elementInfo)
           
 
Methods inherited from class org.universAAL.lddi.lib.ieeex73std.org.bn.coders.Encoder
encodeBoxedType, encodeClassType, encodeElement, encodeEnum, encodeJavaElement, encodePreparedElement, encodeSequenceField, getChoiceSelectedElement, invokeGetterMethodForField, invokeSelectedMethodForField, isSelectedChoiceItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncoderMDER

public EncoderMDER()
Method Detail

encode

public void encode(T object,
                   OutputStream os)
            throws Exception
Description copied from interface: IEncoder
Encode object

Specified by:
encode in interface IEncoder<T>
Overrides:
encode in class Encoder<T>
Parameters:
object - User object
os - Stream to encoding
Throws:
Exception
See Also:
CoderFactory

encodeInteger

public int encodeInteger(Object object,
                         OutputStream stream,
                         ElementInfo elementInfo)
                  throws Exception
Throws:
Exception

encodeOctetString

public int encodeOctetString(Object object,
                             OutputStream stream,
                             ElementInfo elementInfo)
                      throws Exception
Two types of OctetString: - fixed-length (size constrained) - variable length (has an extra U-16 Integer as a length field) and then the octets.

Throws:
Exception

encodeBitString

public int encodeBitString(Object object,
                           OutputStream stream,
                           ElementInfo elementInfo)
                    throws Exception
Three types of BitString: - 8 bits - 16 bits - 32 bits We only have to extract the length in bytes of the BitString

Throws:
Exception

encodeSequence

public int encodeSequence(Object object,
                          OutputStream stream,
                          ElementInfo elementInfo)
                   throws Exception
Specified by:
encodeSequence in interface IASN1TypesEncoder
Overrides:
encodeSequence in class Encoder<T>
Throws:
Exception

encodeSequenceOf

public int encodeSequenceOf(Object object,
                            OutputStream stream,
                            ElementInfo elementInfo)
                     throws Exception
Group of elements of the same type. Contains: - A header with two fields: count of number of elements / length in octets of the encoded elements (not sums the header fields) - Encoded elements, one after another

Throws:
Exception

encodeChoice

public int encodeChoice(Object object,
                        OutputStream stream,
                        ElementInfo elementInfo)
                 throws Exception
Specified by:
encodeChoice in interface IASN1TypesEncoder
Overrides:
encodeChoice in class Encoder<T>
Throws:
Exception

encodeAny

public int encodeAny(Object object,
                     OutputStream stream,
                     ElementInfo elementInfo)
              throws Exception
Two fields: - Length in octets of the next field (INT_U16) - Encoding of selected value (m octets)

Throws:
Exception

encodeEnumItem

public int encodeEnumItem(Object enumConstant,
                          Class enumClass,
                          OutputStream stream,
                          ElementInfo elementInfo)
                   throws Exception
Throws:
Exception

encodeBoolean

public int encodeBoolean(Object object,
                         OutputStream stream,
                         ElementInfo elementInfo)
                  throws Exception
Throws:
Exception

encodeObjectIdentifier

public int encodeObjectIdentifier(Object object,
                                  OutputStream steam,
                                  ElementInfo elementInfo)
                           throws Exception
Throws:
Exception

encodeString

public int encodeString(Object object,
                        OutputStream steam,
                        ElementInfo elementInfo)
                 throws Exception
Throws:
Exception

encodeNull

public int encodeNull(Object object,
                      OutputStream stream,
                      ElementInfo elementInfo)
               throws Exception
Throws:
Exception

encodeReal

public int encodeReal(Object object,
                      OutputStream steam,
                      ElementInfo elementInfo)
               throws Exception
Throws:
Exception


Copyright © 2014 universAAL Consortium. All Rights Reserved.