Resource Base
Table of contents
Notice: This documentation is archived. For the latest product features and documentation, please visit Dynamsoft Capture Vision Documentation.

CodeParser Class

The CodeParser class enable users to configure the code parser settings or parse the content.

Definition

Namespace: com.dynamsoft.dcp

Assembly: DynamsoftCodeParser.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.

Is this page helpful?

YesYes NoNo

In this article:

Version 2.2.11

    • version 2.2.11
    • Version 2.x
      • Version 2.2.11
      • Version 2.2.10
      • Version 2.0.20
    Change +