Package com.google.zxing.common
Class DecoderResult
java.lang.Object
com.google.zxing.common.DecoderResult
Encapsulates the result of decoding a matrix of bits. This typically applies to 2D barcode formats. For now it contains the raw bytes obtained, as well as a String interpretation of those bytes, if applicable.
- Author:
- Sean Owen
-
Constructor Summary
ConstructorsConstructorDescriptionDecoderResult(byte[] rawBytes, String text, List<byte[]> byteSegments, String ecLevel) DecoderResult(byte[] rawBytes, String text, List<byte[]> byteSegments, String ecLevel, int symbologyModifier) DecoderResult(byte[] rawBytes, String text, List<byte[]> byteSegments, String ecLevel, int saSequence, int saParity) DecoderResult(byte[] rawBytes, String text, List<byte[]> byteSegments, String ecLevel, int saSequence, int saParity, int symbologyModifier) -
Method Summary
Modifier and TypeMethodDescriptionList<byte[]>intgetOther()byte[]intintintgetText()booleanvoidsetErasures(Integer erasures) voidsetErrorsCorrected(Integer errorsCorrected) voidsetNumBits(int numBits) void
-
Constructor Details
-
DecoderResult
-
DecoderResult
-
DecoderResult
-
DecoderResult
-
-
Method Details
-
getRawBytes
public byte[] getRawBytes()- Returns:
- raw bytes representing the result, or
nullif not applicable
-
getNumBits
public int getNumBits()- Returns:
- how many bits of
getRawBytes()are valid; typically 8 times its length - Since:
- 3.3.0
-
setNumBits
public void setNumBits(int numBits) - Parameters:
numBits- overrides the number of bits that are valid ingetRawBytes()- Since:
- 3.3.0
-
getText
- Returns:
- text representation of the result
-
getByteSegments
- Returns:
- list of byte segments in the result, or
nullif not applicable
-
getECLevel
- Returns:
- name of error correction level used, or
nullif not applicable
-
getErrorsCorrected
- Returns:
- number of errors corrected, or
nullif not applicable
-
setErrorsCorrected
-
getErasures
- Returns:
- number of erasures corrected, or
nullif not applicable
-
setErasures
-
getOther
- Returns:
- arbitrary additional metadata
-
setOther
-
hasStructuredAppend
public boolean hasStructuredAppend() -
getStructuredAppendParity
public int getStructuredAppendParity() -
getStructuredAppendSequenceNumber
public int getStructuredAppendSequenceNumber() -
getSymbologyModifier
public int getSymbologyModifier()
-