# Interface ScanResult

public interface ScanResult

Deprecated!!: Please use the cn1-codescan library instead.

Callback for the code scanner indicating the result of a scan operation, the methods of this call will always be invoked on the EDT!

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `scanCanceled()`
  Invoked if the user canceled the scan
  `void`
  `scanCompleted(String contents, String formatName, byte[] rawBytes)`
  Called upon a successful scan operation
  `void`
  `scanError(int errorCode, String message)`
  Invoked if an error occurred during the scanning process

- ## Method Details

  - ### scanCompleted

    void scanCompleted(String contents, String formatName, byte[] rawBytes)

    Called upon a successful scan operation

    ###### Parameters

    - `contents`: the contents of the data

    - `formatName`: the format of the scan

    - `rawBytes`: the bytes of data

  - ### scanCanceled

    void scanCanceled()
    Invoked if the user canceled the scan

  - ### scanError

    void scanError(int errorCode, String message)

    Invoked if an error occurred during the scanning process

    ###### Parameters

    - `errorCode`: code

    - `message`: descriptive message