CodeParser Class
The CodeParser class enable users to configure the code parser settings or parse the content.
Definition
Namespace: com.dynamsoft.dcp
Assembly: DynamsoftCaptureVisionBundle.aar
class CodeParser
| Method | Description |
|---|---|
CodeParser |
The constructor. |
initSettingsFromFile |
Initialize runtime settings with the settings in a given JSON file. |
initSettings |
Initialize runtime settings with the settings in a given JSON string. |
parse |
Parses code data for readable results. |
resetSettings |
Reset runtime settings to default. |
CodeParser
Default constructor of a CodeParser object.
CodeParser();
Parse
Parses code data for human-readable results.
ParsedResultItem parse(byte[] bytes, String taskSettingName) throws CodeParserException;
Parameters
[in] bytes The array of bytes which contain the code string.
[in] taskSettingNameOptional The name of CodeParserTaskSetting which defines the settings used for code parsing.
Return Value
Returns ParsedResultItem which stores the human-readable results.
ResetSettings
Reset all parameters to default values.
void resetSettings();
InitSettingsFromFile
Initialize settings from a given file.
void initSettingsFromFile(String filePath) throws CodeParserException;
Parameters
[in] filePath The path of the settings file.
InitSettings
Initialize settings from a given string.
void initSettings(String content) throws CodeParserException;
Parameters
[in] content A JSON string that represents the content of the settings.