DTASN1Parser Class Reference
| Inherits from | NSObject |
| Declared in | DTASN1Parser.h |
Overview
Instances of this class parse ASN1 documents in an event-driven manner. A DTASN1Parser notifies its delegate about the items (elements, collections, and so on) that it encounters as it processes an ASN1 document. It does not itself do anything with those parsed items except report them. It also reports parsing errors. For convenience, a DTASN1Parser object in the following descriptions is sometimes referred to as a parser object.
Tasks
Initializing a Parser Object
Parsing
-
– parse -
– abortParsing -
delegateproperty -
parserErrorproperty
Properties
delegate
An object that is the parsing delegate. It is not retained. The delegate must conform to the DTASN1ParserDelegate Protocol protocol.
@property (nonatomic, DT_WEAK_PROPERTY) id<DTASN1ParserDelegate> delegateDeclared In
DTASN1Parser.hparserError
Returns an NSError object from which you can obtain information about a parsing error.
@property (nonatomic, readonly, strong) NSError *parserErrorDiscussion
You may invoke this method after a parsing operation abnormally terminates to determine the cause of error.
Declared In
DTASN1Parser.hInstance Methods
initWithData:
Initializes the receiver with the ASN1 contents encapsulated in a given data object.
- (id)initWithData:(NSData *)dataParameters
- data
An
NSDataobject containing ASN1 encoded data.
Return Value
An initialized DTASN1Parser object or nil if an error occurs.
Declared In
DTASN1Parser.hparse
Starts the event-driven parsing operation.
- (BOOL)parseReturn Value
YES if parsing is successful and NO in there is an error or if the parsing operation is aborted.
Discussion
If you invoke this method, the delegate, if it implements parser:parseErrorOccurred:, is informed of the cancelled parsing operation.
Declared In
DTASN1Parser.h