|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.objsys.asn1j.runtime.Asn1MessageBuffer
com.objsys.asn1j.runtime.Asn1DecodeBuffer
com.objsys.asn1j.runtime.Asn1BerDecodeBuffer
This class handles the decoding of ASN.1 messages as specified in the Basic Encoding Rules (BER) as documented in the ITU-T X.690 standard.
| Field Summary |
| Fields inherited from class com.objsys.asn1j.runtime.Asn1DecodeBuffer |
mByteCount |
| Constructor Summary | |
Asn1BerDecodeBuffer(byte[] msgdata)
This constructor creates a BER decode buffer object that references an encoded ASN.1 message. |
|
Asn1BerDecodeBuffer(java.io.InputStream istream)
This constructor creates a BER decode buffer object that references an encoded ASN.1 message. |
|
| Method Summary | |
static int |
calcIndefLen(byte[] data,
int offset,
int len)
This function calculates the actual length of an indefinite length message component. |
int |
decodeLength()
This method decodes a length value. |
byte[] |
decodeOpenType()
This method decodes an ASN.1 BER open type value. |
byte[] |
decodeOpenType(boolean saveData)
This method decodes an ASN.1 BER open type value. |
void |
decodeTag(Asn1Tag tag)
This method decodes a tag value. |
int |
decodeTagAndLength(Asn1Tag tag)
This method decodes a tag and length value. |
Asn1Tag |
getLastTag()
This method will return the last tag parsed within this decode buffer object. |
boolean |
matchTag(Asn1Tag tag)
This overloaded version of matchTag will just test for a match and not return parsed tag and length values |
boolean |
matchTag(Asn1Tag tag,
Asn1Tag parsedTag,
IntHolder parsedLen)
This overloaded version of matchTag allows the tag value to be matched to be passed using an Asn1Tag object. |
boolean |
matchTag(short tagClass,
short tagForm,
int tagIDCode,
Asn1Tag parsedTag,
IntHolder parsedLen)
This method decodes the next tag value and checks for a match with the given tag value. |
protected void |
movePastEOC(boolean saveData)
|
void |
parse(Asn1TaggedEventHandler handler)
This method parses the complete message and invokes the event handler callback methods as various items are encountered. |
Asn1Tag |
peekTag()
This overloaded version of the peekTag method will return a reference to a newly created tag object. |
void |
peekTag(Asn1Tag parsedTag)
This method will parse and return the next tag in the decode stream without advancing the decode cursor. |
int |
readByte()
This method returns the next available 8-bit value from the input stream. |
| Methods inherited from class com.objsys.asn1j.runtime.Asn1DecodeBuffer |
addCaptureBuffer, addNamedEventHandler, capture, decodeIntValue, decodeOIDContents, decodeRelOIDContents, getByteCount, getInputStream, hexDump, init, invokeCharacters, invokeEndElement, invokeStartElement, mark, read, read, read, removeCaptureBuffer, reset, setEventHandlerList, setInputStream, setTypeCode, skip |
| Methods inherited from class com.objsys.asn1j.runtime.Asn1MessageBuffer |
hexDump, hexDump, setKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Asn1BerDecodeBuffer(byte[] msgdata)
msgdata - Byte array containing an encoded ASN.1 message.public Asn1BerDecodeBuffer(java.io.InputStream istream)
istream - Input stream containing an encoded ASN.1 message.| Method Detail |
public static int calcIndefLen(byte[] data,
int offset,
int len)
throws Asn1Exception,
java.io.IOException
data - Buffer with the indefinite length message component.offset - Offset in the bufferlen - Length of the buffer (begining from the offset)
Asn1Exception
java.io.IOException
public int decodeLength()
throws Asn1Exception,
java.io.IOException
Asn1Exception
java.io.IOException
public byte[] decodeOpenType()
throws Asn1Exception,
java.io.IOException
Asn1Exception
java.io.IOException
public byte[] decodeOpenType(boolean saveData)
throws Asn1Exception,
java.io.IOException
saveData - True if data should be captured and returned
Asn1Exception
java.io.IOException
protected final void movePastEOC(boolean saveData)
throws Asn1Exception,
java.io.IOException
Asn1Exception
java.io.IOException
public void decodeTag(Asn1Tag tag)
throws Asn1Exception,
java.io.IOException
tag - Tag object to receive decoded tag fields.
Asn1Exception
java.io.IOException
public int decodeTagAndLength(Asn1Tag tag)
throws Asn1Exception,
java.io.IOException
tag - Tag object to receive decoded tag fields.
Asn1Exception
java.io.IOExceptionpublic Asn1Tag getLastTag()
public boolean matchTag(short tagClass,
short tagForm,
int tagIDCode,
Asn1Tag parsedTag,
IntHolder parsedLen)
throws Asn1Exception,
java.io.IOException
tagClass - Class value of tag to matchtagForm - Form value of tag to matchtagIDCode - ID code of tag to matchparsedTag - Holder object to receive parsed tag valueparsedLen - Holder object to receive parsed length value
Asn1Exception
java.io.IOException
public boolean matchTag(Asn1Tag tag,
Asn1Tag parsedTag,
IntHolder parsedLen)
throws Asn1Exception,
java.io.IOException
tag - Tag value to be matched.parsedTag - Holder object to receive parsed tag valueparsedLen - Holder object to receive parsed length value
Asn1Exception
java.io.IOException
public boolean matchTag(Asn1Tag tag)
throws Asn1Exception,
java.io.IOException
tag - Tag value to be matched.
Asn1Exception
java.io.IOException
public void peekTag(Asn1Tag parsedTag)
throws Asn1Exception,
java.io.IOException
parsedTag - Holder object to receive parsed tag value
Asn1Exception
java.io.IOException
public Asn1Tag peekTag()
throws Asn1Exception,
java.io.IOException
Asn1Exception
java.io.IOException
public void parse(Asn1TaggedEventHandler handler)
throws Asn1Exception,
java.io.IOException
handler - Object implementing the Asn1EventHandler interface.
Asn1Exception
java.io.IOException
public int readByte()
throws Asn1Exception,
java.io.IOException
readByte in class Asn1DecodeBufferAsn1Exception
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||