DecodeWorker.java (zxing-zxing-3.4.1) | : | DecodeWorker.java (zxing-zxing-3.5.0) | ||
---|---|---|---|---|
skipping to change at line 168 | skipping to change at line 168 | |||
StringWriter output = new StringWriter(); | StringWriter output = new StringWriter(); | |||
for (Result result : results) { | for (Result result : results) { | |||
ParsedResult parsedResult = ResultParser.parseResult(result); | ParsedResult parsedResult = ResultParser.parseResult(result); | |||
output.write(uri + | output.write(uri + | |||
" (format: " + result.getBarcodeFormat() + | " (format: " + result.getBarcodeFormat() + | |||
", type: " + parsedResult.getType() + "):\n" + | ", type: " + parsedResult.getType() + "):\n" + | |||
"Raw result:\n" + | "Raw result:\n" + | |||
result.getText() + "\n" + | result.getText() + "\n" + | |||
"Parsed result:\n" + | "Parsed result:\n" + | |||
parsedResult.getDisplayResult() + "\n"); | parsedResult.getDisplayResult() + "\n"); | |||
if (config.outputRaw) { | ||||
StringBuilder rawData = new StringBuilder(); | ||||
for (byte b : result.getRawBytes()) { | ||||
rawData.append(String.format("%02X", b & 0xff)); | ||||
rawData.append(" "); | ||||
} | ||||
rawData.setLength(rawData.length() - 1); // chop off final space | ||||
output.write("Raw bits:\n" + rawData + "\n"); | ||||
} | ||||
ResultPoint[] resultPoints = result.getResultPoints(); | ResultPoint[] resultPoints = result.getResultPoints(); | |||
int numResultPoints = resultPoints.length; | int numResultPoints = resultPoints.length; | |||
output.write("Found " + numResultPoints + " result points.\n"); | output.write("Found " + numResultPoints + " result points.\n"); | |||
for (int pointIndex = 0; pointIndex < numResultPoints; pointIndex++) { | for (int pointIndex = 0; pointIndex < numResultPoints; pointIndex++) { | |||
ResultPoint rp = resultPoints[pointIndex]; | ResultPoint rp = resultPoints[pointIndex]; | |||
if (rp != null) { | if (rp != null) { | |||
output.write(" Point " + pointIndex + ": (" + rp.getX() + ',' + rp. getY() + ')'); | output.write(" Point " + pointIndex + ": (" + rp.getX() + ',' + rp. getY() + ')'); | |||
if (pointIndex != numResultPoints - 1) { | if (pointIndex != numResultPoints - 1) { | |||
output.write('\n'); | output.write('\n'); | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 13 lines changed or added |