|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.webdocwf.util.smime.der.DERObject
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 | |
DERObject(int identifierOctet0)
Creates DER Object with defined value for identifier octet. |
|
DERObject(int identifierOctet0,
byte[] content0)
Creates DER Object with defined value for identifier octet and values of content octets |
Method Summary | |
byte[] |
getContentOctets()
Return content octets part from DER object. |
int |
getContentPartSize()
Returns size of content part in DER object (Number of content octets). |
byte[] |
getDEREncoded()
Returns DER encoded object |
int |
getIdentifierOctet()
Returns Identifier Octet |
byte[] |
getLengthOctets()
Return length octets part from DER object. |
int |
getLengthPartSize()
Returns size of length part in DER object (Number of length octets). |
int |
getTagClassType()
Returns Class Type |
int |
getTagComplexity()
Returns Tag Complexity |
int |
getTagTypeNumber()
Returns Tag Type |
int |
getTotalSize()
Returns total length of DER object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DERObject(int identifierOctet0) throws SMIMEException
identifierOctet0
- must be in the range 0-255 (whithouth 31)SMIMEException
- in case of invalid identifierOctet0 parameterpublic DERObject(int identifierOctet0, byte[] content0) throws SMIMEException
identifierOctet0
- must be in the range 0-255 (whithouth 31)content0
- content of DER ObjectSMIMEException
- in case of invalid identifierOctet0 parameter,
or in case of adding content to DER object of type Null DER objectMethod Detail |
public byte[] getDEREncoded() throws SMIMEException
SMIMEException
- if content of DER object is absent. Also, it can be
caused by non SMIMEException which is: UnsupportedEncodingException.public int getIdentifierOctet()
public int getTagTypeNumber()
public int getTagClassType()
public int getTagComplexity()
public int getContentPartSize()
public int getLengthPartSize()
public byte[] getContentOctets() throws SMIMEException
SMIMEException
- caused by non SMIMEException which is:
UnsupportedEncodingException .public byte[] getLengthOctets() throws SMIMEException
SMIMEException
- caused by non SMIMEException which is:
UnsupportedEncodingException.public int getTotalSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |