Public Member Functions | |
ParserResult | ParseRawData (byte[] rawData) |
ParserResult | ParseString (string str) |
void | SetOptions (IDictionary< string, Java.Lang.Object > optionMap) |
Detailed Description
Defines the interface for a data string parser.
Parsers are capable of parsing one particular data format, which is passed to them during construction.
The parser is created through BarcodePicker.createParserForFormat(). Note that you need to have a valid license to use the parser feature.
For documentation on the available formats, go to the official parser library documentation.
- Since
- 5.8
Member Function Documentation
ParserResult ParseRawData | ( | byte[] | rawData | ) |
Parses the data and returns the contained fields in the result object.
Use this overload in case you have data that cannot be safely represented using unicode code points.
In case parsing of the data failed, an IllegalArgumentException is thrown.
- Parameters
-
rawData The string to parse. Must not be null.
- Returns
- The result object. Before accessing the fields of the result, you must ensure that the rawData was correctly parsed, that is, IllegalArgumentException hasn't been thrown.
ParserResult ParseString | ( | string | str | ) |
Parses the data string and returns the contained fields in the result object.
In case parsing of the data failed, an IllegalArgumentException is thrown.
- Parameters
-
str The string to parse. Must not be null.
- Returns
- The result object. Before accessing the fields of the result, you must ensure that the string was correctly parsed, that is, IllegalArgumentException hasn't been thrown.
void SetOptions | ( | IDictionary< string, Java.Lang.Object > | optionMap | ) |
Apply the option map to the parser, allowing the user to fine-tune the behavior of the parser.
Available options depend on the data format and are specified in the respective documentation.
In case the options could not be applied, an IllegalArgumentException is thrown.
- Parameters
-
optionMap The options dictionary. Must not be null.