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 SummaryConstructorsConstructorDescriptionDecoderResult(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 SummaryModifier and TypeMethodDescriptionList<byte[]>intgetOther()byte[]intintintgetText()booleanvoidsetErasures(Integer erasures) voidsetErrorsCorrected(Integer errorsCorrected) voidsetNumBits(int numBits) void
- 
Constructor Details- 
DecoderResult
- 
DecoderResult
- 
DecoderResult
- 
DecoderResult
 
- 
- 
Method Details- 
getRawBytespublic byte[] getRawBytes()- Returns:
- raw bytes representing the result, or nullif not applicable
 
- 
getNumBitspublic int getNumBits()- Returns:
- how many bits of getRawBytes()are valid; typically 8 times its length
- Since:
- 3.3.0
 
- 
setNumBitspublic void setNumBits(int numBits) - Parameters:
- numBits- overrides the number of bits that are valid in- getRawBytes()
- 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
- 
hasStructuredAppendpublic boolean hasStructuredAppend()
- 
getStructuredAppendParitypublic int getStructuredAppendParity()
- 
getStructuredAppendSequenceNumberpublic int getStructuredAppendSequenceNumber()
- 
getSymbologyModifierpublic int getSymbologyModifier()
 
-