/*
- * Copyright 2007 Google Inc.
+ * Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
byte[] rawBytes,
ResultPoint[] resultPoints,
BarcodeFormat format) {
+ if (text == null && rawBytes == null) {
+ throw new IllegalArgumentException("Text and bytes are null");
+ }
this.text = text;
this.rawBytes = rawBytes;
this.resultPoints = resultPoints;
resultMetadata.put(type, value);
}
+ public String toString() {
+ if (text == null) {
+ return "[" + rawBytes.length + " bytes]";
+ } else {
+ return text;
+ }
+ }
+
}