Package se.digg.dgc.encoding
Interface BarcodeDecoder
-
- All Known Implementing Classes:
DefaultBarcodeDecoder
public interface BarcodeDecoder
An interface for reading/decoding barcodes (QR/Aztec).- Author:
- Martin Lindström (martin@idsec.se), Henrik Bengtsson (extern.henrik.bengtsson@digg.se), Henric Norlander (extern.henric.norlander@digg.se)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
decode(byte[] image, Barcode.BarcodeType type)
Locates the barcode in the supplied image and decodes it.String
decodeToString(byte[] image, Barcode.BarcodeType type, Charset characterSet)
Locates the barcode in the supplied image and decodes it into a string of the given character set.
-
-
-
Method Detail
-
decode
byte[] decode(byte[] image, Barcode.BarcodeType type) throws BarcodeException
Locates the barcode in the supplied image and decodes it.- Parameters:
image
- the bytes of the images holding the barcodetype
- the type of barcode (set to null if not known)- Returns:
- the contents of the barcode
- Throws:
BarcodeException
- for decoding errors
-
decodeToString
String decodeToString(byte[] image, Barcode.BarcodeType type, Charset characterSet) throws BarcodeException
Locates the barcode in the supplied image and decodes it into a string of the given character set.- Parameters:
image
- the bytes of the images holding the barcodetype
- the type of barcode (set to null if not known)characterSet
- the character set- Returns:
- the contents of the barcode
- Throws:
BarcodeException
- for decoding errors
-
-