This parser implements a subset of RFC1779. the following features are
not supported:
- Object Identifiers ("OID." | "oid." ) as keys.
- Multiple attributes per name component ( "+" )
- Hexadecimal strings ( "#" )
- Names may not be put into "<" and "<"
Quoting and escaping is fully supported, though. Keys are converted into upper case. The keys are not verified. It is possible to specify keys that are not defined in RFC1779 such as for instance CN, O, OU, or ST. This allows the class using this parser to make decisions on which keys are acceptable. Neither is double definition of keys verified. Hence, the name
CN=Volker, CN=Roth; O=FhG, C=DE
is parsed fine and returns as a result two attributes with the key CN.
This class uses a state machine for parsing. The states are described briefly below. Each pair denotes a state transition to the state with the given number that happens on reading the given input. If there is no transition defined for some input then this input leads to the error condition.
- 0
- (*CHAR, 1)
- 1
- ('=', 2)
- 2
- (SEPARATOR, 0), (ESCAPE, 3), (*SPACE, 2), (*CHAR, 5), (QUOTE, 4)
- 3
- (SPECIAL, 5)
- 4
- (QUOTE, 7), (ESCAPE, 6), (*CHAR, 4)
- 5
- (ESCAPE, 3), (SEPARATOR, 0), (*CHAR, 5)
- 6
- (SPECIAL, 4)
- 7
- (SEPARATOR, 0), (*SPACE, 7)
The states 2, 5 and 7 are final states. The machine starts in state 0. In other words, no empty input is accepted.
@author Volker Roth
@version "$Id: RFC1779Parser.java,v 1.6 2007/08/30 08:45:05 pebinger Exp $"
@deprecated