|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.asn1.DERParser
public class DERParser
This class provides a SAX-like parsing facility for DER-encoded data where
elements of interest in the parse tree may be registered to handlers via the
registerHandler(java.lang.String, org.ldaptive.asn1.ParseHandler) methods. DERPath strings are used to map
handlers to elements of interest.
DERPath| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
DERParser()
|
|
| Method Summary | |
|---|---|
void |
parse(ByteBuffer encoded)
Parse a DER-encoded data structure by calling registered handlers when points of interest are encountered in the parse tree. |
int |
readLength(ByteBuffer encoded)
Reads the length of a DER-encoded value from the given byte buffer. |
DERTag |
readTag(ByteBuffer encoded)
Reads a DER tag from a single byte at the current position of the given buffer. |
void |
registerHandler(DERPath path,
ParseHandler handler)
Registers the supplied handler to fire when the supplied path is encountered. |
void |
registerHandler(String path,
ParseHandler handler)
See registerHandler(DERPath, ParseHandler). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public DERParser()
| Method Detail |
|---|
public void registerHandler(String path,
ParseHandler handler)
registerHandler(DERPath, ParseHandler).
path - to registerhandler - to associate with the path
public void registerHandler(DERPath path,
ParseHandler handler)
path - to registerhandler - to associate with the pathpublic void parse(ByteBuffer encoded)
encoded - DER-encoded bytes.public DERTag readTag(ByteBuffer encoded)
encoded - Buffer containing DER-encoded bytes positioned at tag.
public int readLength(ByteBuffer encoded)
encoded - buffer containing DER-encoded bytes positioned at start of
length byte(s).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||