Add Code 93 support. Update tests to reflect new (better) number of successes.
[zxing.git] / core / src / com / google / zxing / oned / EAN13Reader.java
index d8f8775..9c90e83 100644 (file)
@@ -16,8 +16,8 @@
 
 package com.google.zxing.oned;
 
-import com.google.zxing.ReaderException;
 import com.google.zxing.BarcodeFormat;
+import com.google.zxing.NotFoundException;
 import com.google.zxing.common.BitArray;
 
 /**
@@ -27,7 +27,7 @@ import com.google.zxing.common.BitArray;
  * @author Sean Owen
  * @author alasdair@google.com (Alasdair Mackintosh)
  */
-public final class EAN13Reader extends AbstractUPCEANReader {
+public final class EAN13Reader extends UPCEANReader {
 
   // For an EAN-13 barcode, the first digit is represented by the parities used
   // to encode the next six digits, according to the table below. For example,
@@ -69,7 +69,7 @@ public final class EAN13Reader extends AbstractUPCEANReader {
   }
 
   protected int decodeMiddle(BitArray row, int[] startRange, StringBuffer resultString)
-      throws ReaderException {
+      throws NotFoundException {
     int[] counters = decodeMiddleCounters;
     counters[0] = 0;
     counters[1] = 0;
@@ -119,17 +119,17 @@ public final class EAN13Reader extends AbstractUPCEANReader {
    * @param resultString string to insert decoded first digit into
    * @param lgPatternFound int whose bits indicates the pattern of odd/even L/G patterns used to
    *  encode digits
-   * @throws ReaderException if first digit cannot be determined
+   * @throws NotFoundException if first digit cannot be determined
    */
   private static void determineFirstDigit(StringBuffer resultString, int lgPatternFound)
-      throws ReaderException {
+      throws NotFoundException {
     for (int d = 0; d < 10; d++) {
       if (lgPatternFound == FIRST_DIGIT_ENCODINGS[d]) {
         resultString.insert(0, (char) ('0' + d));
         return;
       }
     }
-    throw ReaderException.getInstance();
+    throw NotFoundException.getNotFoundInstance();
   }
 
-}
\ No newline at end of file
+}