Add minimal support for FNC1 mode in QR Code
[zxing.git] / core / src / com / google / zxing / qrcode / decoder / DataBlock.java
index ca146cc..7cbf406 100755 (executable)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright 2007 Google Inc.\r
+ * Copyright 2007 ZXing authors\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -42,7 +42,7 @@ final class DataBlock {
    * @param version version of the QR Code\r
    * @param ecLevel error-correction level of the QR Code\r
    * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the\r
-   *  QR Code\r
+   *         QR Code\r
    */\r
   static DataBlock[] getDataBlocks(byte[] rawCodewords,\r
                                    Version version,\r
@@ -80,7 +80,7 @@ final class DataBlock {
         break;\r
       }\r
       if (numCodewords != shorterBlocksTotalCodewords + 1) {\r
-        throw new IllegalStateException("Data block sizes differ by more than 1");\r
+        throw new IllegalArgumentException("Data block sizes differ by more than 1");\r
       }\r
       longerBlocksStartAt--;\r
     }\r
@@ -109,7 +109,7 @@ final class DataBlock {
     }\r
 \r
     if (rawCodewordsOffset != rawCodewords.length) {\r
-      throw new IllegalStateException();\r
+      throw new IllegalArgumentException();\r
     }\r
 \r
     return result;\r