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)
      Locates the barcode in the supplied image and decodes it.
      String decodeToString​(byte[] image, 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)
               throws BarcodeException
        Locates the barcode in the supplied image and decodes it.
        Parameters:
        image - the bytes of the images holding the barcode
        Returns:
        the contents of the barcode
        Throws:
        BarcodeException - for decoding errors
      • decodeToString

        String decodeToString​(byte[] image,
                              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 barcode
        characterSet - the character set
        Returns:
        the contents of the barcode
        Throws:
        BarcodeException - for decoding errors