| java.lang.Object org.enhydra.oyster.der.DERObject
All known Subclasses: org.enhydra.oyster.der.DERSetPr, org.enhydra.oyster.der.DERBitString, org.enhydra.oyster.der.DERIA5String, org.enhydra.oyster.der.DEROctetString, org.enhydra.oyster.der.DERSequencePr, org.enhydra.oyster.der.DERPrintableString, org.enhydra.oyster.der.DERNull, org.enhydra.oyster.der.DERInteger, org.enhydra.oyster.der.DERClassContextSpecificPr, org.enhydra.oyster.der.DERBoolean, org.enhydra.oyster.der.DERUTCTime, org.enhydra.oyster.der.DERObjectIdentifier,
DERObject | public class DERObject (Code) | | Every element of data represented in ASN.1 notation should be encoded
in the process of implementation. It can be done according to BER (Basic
Encoding Rules) or according to DER (Distinguish Encoding Rules). DERObject
class is the root class (super class) of all classes used in DER encodings
of variety elements in data structures used by SMIME.
DER encoding of elements can be performed in two forms: definite form and
indefinite form. DERObject class represents definite form of encoding. Every
encoded element, according to this rules, involves three parts: Identifier
Octet (which represents Tag Type of the encoding data), Length Octets (one
or more octets with the information about number of octets (bytes) in the
content), and Content Octets (they represent data which have to be DER
encoded).
DERObject can be structured or primitive, which depends on his content.
|
Constructor Summary | |
public | DERObject(int identifierOctet0) Creates DER Object with defined value for identifier octet. | public | DERObject(int identifierOctet0, byte[] content0) |
DERObject | public DERObject(int identifierOctet0) throws SMIMEException(Code) | | Creates DER Object with defined value for identifier octet.
Parameters: identifierOctet0 - must be in the range 0-255 (whithouth 31) exception: SMIMEException - in case of invalid identifierOctet0 parameter |
DERObject | public DERObject(int identifierOctet0, byte[] content0) throws SMIMEException(Code) | | Creates DER Object with defined value for identifier octet and values of
content octets
Parameters: identifierOctet0 - must be in the range 0-255 (whithouth 31) Parameters: content0 - content of DER Object exception: SMIMEException - in case of invalid identifierOctet0 parameter,or in case of adding content to DER object of type Null DER object |
addContent | void addContent(byte[] content0) throws SMIMEException(Code) | | Adds content to DER Object. Used only when the content isn't added earlier
via second type of constructor in DERObject.
Parameters: content0 - content octets for adding to DERObject exception: SMIMEException - when adding content to DER object is of typeNull DER object. Also, it can be caused by non SMIMEException which is:UnsupportedEncodingException. |
getContentOctets | public byte[] getContentOctets() throws SMIMEException(Code) | | Return content octets part from DER object.
Number of content octets in DER encoded object exception: SMIMEException - caused by non SMIMEException which is:UnsupportedEncodingException . |
getContentPartSize | public int getContentPartSize()(Code) | | Returns size of content part in DER object (Number of content octets).
Number of content octets in DER encoded object |
getDEREncoded | public byte[] getDEREncoded() throws SMIMEException(Code) | | Returns DER encoded object
DERObject as byte array exception: SMIMEException - if content of DER object is absent. Also, it can becaused by non SMIMEException which is: UnsupportedEncodingException. |
getIdentifierOctet | public int getIdentifierOctet()(Code) | | Returns Identifier Octet
Identifier Octet in the range 0-255 |
getLengthOctets | public byte[] getLengthOctets() throws SMIMEException(Code) | | Return length octets part from DER object.
Number of length octets in DER encoded object exception: SMIMEException - caused by non SMIMEException which is:UnsupportedEncodingException. |
getLengthPartSize | public int getLengthPartSize()(Code) | | Returns size of length part in DER object (Number of length octets).
Number of length octets in DER encoded object |
getTagClassType | public int getTagClassType()(Code) | | Returns Class Type
0-Universal, 64-Application, 128-Context, 192-Private (Default 0) |
getTagComplexity | public int getTagComplexity()(Code) | | Returns Tag Complexity
0-primitive, 32-structured (Default 0) |
getTagTypeNumber | public int getTagTypeNumber()(Code) | | Returns Tag Type
Tag Type in the range 0-30 |
getTotalSize | public int getTotalSize()(Code) | | Returns total length of DER object
Total length of DER Object (involves identifier octet, lengthoctets and content octets) |
|
|