Dev Center
Table of contents

Java API Reference

BarcodeReader Class

Initialize and Destroy

Method Description
BarcodeReader Initialization of BarcodeReader object.
destroy Destroys an instance of BarcodeReader object.

License Methods

Method Description
initLicense Read product key and activate the SDK.
initLicenseFromServer Initialize license and connect to the specified server for online verification.
initLicenseFromLicenseContent Initialize license from the license content on client machine for offline verification.
outputLicenseToString Output the license content to a string from the license server.
initDLSConnectionParameters Initializes a DMDLSConnectionParameters struct with default values.
initLicenseFromDLS Initializes the barcode reader license and connects to the specified server for online verification.
getIdleInstancesCount Gets available instances count when charging by concurrent instances count.
initLTSConnectionParameters Deprecated. Use initDLSConnectionParameters instead.
initLicenseFromLTS Deprecated. Use initLicenseFromDLS instead.

Decode Methods

Method Description
decodeFile Decode barcodes from a specified image file.
decodeFileInMemory Decode barcodes from an image file in memory.
decodeBuffer Decode barcodes from raw buffer.
decodeBase64String Decode barcodes from a base64 encoded string.
decodeBufferedImage Decodes barcode from a buffered imag (bitmap).
initIntermediateResult Inits an intermediateResult struct with default values.
decodeIntermediateResults Decodes barcode from intermediate results.

Basic Settings Methods

Method Description
setModeArgument Set argument value for the specified mode parameter.
getModeArgument Get argument value for the specified mode parameter.
getRuntimeSettings Get current runtime settings.
updateRuntimeSettings Modify and update the current runtime settings.
resetRuntimeSettings Reset runtime settings to default.

Advanced Settings Methods

Method Description
initRuntimeSettingsWithFile Initialize runtime settings with the settings in a given JSON file.
initRuntimeSettingsWithString Initialize runtime settings with the settings in a given JSON string.
appendTplFileToRuntimeSettings Append a new template file to the current runtime settings.
appendTplStringToRuntimeSettings Append a new template string to the current runtime settings.
getAllParameterTemplateNames Gets the parameter templates name array.
outputSettingsToFile Output runtime settings to a settings file (JSON file).
outputSettingsToString Output runtime settings to a string.

Result Methods

Method Description
getIntermediateResults Get intermediate results.

General Methods

Method Description
getVersion Get version information of SDK.

Video Methods

Decode

Method Description
startFrameDecoding Decode barcodes from inner frame queue.
startFrameDecodingEx Decode barcodes from inner frame queue.
appendFrame Append a frame image buffer to the inner frame queue.
stopFrameDecoding Stop thread used for frame decoding.

Parameter

Method Description
initFrameDecodingParameters Initialize frame decoding parameter.

Callback

Method Description
setErrorCallback Set callback interface to process errors which is triggered when the library finishes decoding a frame.
setTextResultCallback Set callback interface to process text results which is triggered when the library finishes decoding a frame.
setIntermediateResultCallback Set callback interface to process intermediate results which is triggered when the library finishes decoding a frame.

Status retrieval

Method Description
getLengthOfFrameQueue Get length of current inner frame queue.

Auxiliary Classes

Enumerations

Format Enumeration

Enumeration Description
BarcodeFormat Describes the barcode types in BarcodeFormat group 1.
BarcodeFormat_2 Describes the barcode types in BarcodeFormat group 2.

Parameter Mode Enumeration

Enumeration Description
BarcodeColourMode Describes the barcode colour mode.
BarcodeComplementMode Describes the barcode complement mode.
BinarizationMode Describes the binarization mode.
ColourClusteringMode Describes the colour clustering mode.
ColourConversionMode Describes the colour conversion mode.
ConflictMode Describes the conflict mode.
DeblurMode Describes the deblur mode.
DeformationResistingMode Describes the deformation resisting mode.
DPMCodeReadingMode Describes the DPM code reading mode.
GrayscaleTransformationMode Describes the grayscale transformation mode.
ImagePreprocessingMode Describes the image preprocessing mode.
LocalizationMode Describes the localization mode.
PDFReadingMode Describes the PDF reading mode.
RegionPredetectionMode Describes the region predetection mode.
ScaleUpMode Describes the scale up mode.
TerminatePhase Describes the terminate phase.
TextFilterMode Describes the text filter mode.
TextureDetectionMode Describes the texture detection mode.
Enumeration Description
IMResultDataType Describes the intermediate result data type.
IntermediateResultSavingMode Describes the intermediate result saving mode.
IntermediateResultType Describes the intermediate result type.
ResultCoordinateType Describes the result coordinate type.
ResultType Describes the extended result type.
TextResultOrderMode Describes the text result order mode.

Frame Decoding Enumeration

Enumeration Description
ClarityCalculationMethod Describes the clarity calculation method.
ClarityFilterMode Describes the clarity filter mode.

Other Enumeration

Enumeration Description
DM_ChargeWay Describes the charge way.
DM_DeploymentType Describes the deployment type.
DM_LicenseModule Describes Dynamsoft license modules.
DM_UUIDGenerationMethod Describes the UUID generation method.
ImagePixelFormat Describes the image pixel format.
QRCodeErrorCorrectionLevel Describes the QR Code error correction level.
Product Describes Dynamsoft products.

Interfaces

Interface Description
ErrorCallback Represents the method that will handle the error code returned by the SDK.
IntermediateResultCallback Represents the method that will handle the intermediate result array returned by the SDK.
TextResultCallback Represents the method that will handle the text result array returned by the SDK.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 8.9.3

  • Latest version
  • Version 10.x
    • Version 10.2.0
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +