Full Code of nanchen2251/AiYaScanner for AI

master b6db3e88a1bc cached
306 files
1.5 MB
435.2k tokens
2074 symbols
1 requests
Download .txt
Showing preview only (1,633K chars total). Download the full file or copy to clipboard to get everything.
Repository: nanchen2251/AiYaScanner
Branch: master
Commit: b6db3e88a1bc
Files: 306
Total size: 1.5 MB

Directory structure:
gitextract_tggjnmmr/

├── .gitignore
├── .idea/
│   ├── codeStyles/
│   │   └── Project.xml
│   ├── gradle.xml
│   ├── misc.xml
│   ├── runConfigurations.xml
│   └── vcs.xml
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── nanchen/
│       │               └── aiyascanner/
│       │                   └── ExampleInstrumentedTest.java
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── nanchen/
│       │   │           └── aiyascanner/
│       │   │               └── MainActivity.java
│       │   └── res/
│       │       ├── drawable/
│       │       │   └── ic_launcher_background.xml
│       │       ├── drawable-v24/
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── layout/
│       │       │   └── activity_main.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       └── values/
│       │           ├── colors.xml
│       │           ├── dimens.xml
│       │           ├── strings.xml
│       │           └── styles.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── nanchen/
│                       └── aiyascanner/
│                           └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── scanner/
│   ├── .gitignore
│   ├── build.gradle
│   ├── libs/
│   │   └── zbar-1.0.0.jar
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       ├── google/
│           │       │   └── zxing/
│           │       │       ├── BarcodeFormat.java
│           │       │       ├── Binarizer.java
│           │       │       ├── BinaryBitmap.java
│           │       │       ├── ChecksumException.java
│           │       │       ├── DecodeHintType.java
│           │       │       ├── Dimension.java
│           │       │       ├── EncodeHintType.java
│           │       │       ├── FormatException.java
│           │       │       ├── InvertedLuminanceSource.java
│           │       │       ├── LuminanceSource.java
│           │       │       ├── MultiFormatReader.java
│           │       │       ├── MultiFormatWriter.java
│           │       │       ├── NotFoundException.java
│           │       │       ├── PlanarYUVLuminanceSource.java
│           │       │       ├── RGBLuminanceSource.java
│           │       │       ├── Reader.java
│           │       │       ├── ReaderException.java
│           │       │       ├── Result.java
│           │       │       ├── ResultMetadataType.java
│           │       │       ├── ResultPoint.java
│           │       │       ├── ResultPointCallback.java
│           │       │       ├── Writer.java
│           │       │       ├── WriterException.java
│           │       │       ├── aztec/
│           │       │       │   ├── AztecDetectorResult.java
│           │       │       │   ├── AztecReader.java
│           │       │       │   ├── AztecWriter.java
│           │       │       │   ├── decoder/
│           │       │       │   │   └── Decoder.java
│           │       │       │   ├── detector/
│           │       │       │   │   └── Detector.java
│           │       │       │   └── encoder/
│           │       │       │       ├── AztecCode.java
│           │       │       │       ├── BinaryShiftToken.java
│           │       │       │       ├── Encoder.java
│           │       │       │       ├── HighLevelEncoder.java
│           │       │       │       ├── SimpleToken.java
│           │       │       │       ├── State.java
│           │       │       │       └── Token.java
│           │       │       ├── client/
│           │       │       │   └── result/
│           │       │       │       ├── AbstractDoCoMoResultParser.java
│           │       │       │       ├── AddressBookAUResultParser.java
│           │       │       │       ├── AddressBookDoCoMoResultParser.java
│           │       │       │       ├── AddressBookParsedResult.java
│           │       │       │       ├── BizcardResultParser.java
│           │       │       │       ├── BookmarkDoCoMoResultParser.java
│           │       │       │       ├── CalendarParsedResult.java
│           │       │       │       ├── EmailAddressParsedResult.java
│           │       │       │       ├── EmailAddressResultParser.java
│           │       │       │       ├── EmailDoCoMoResultParser.java
│           │       │       │       ├── ExpandedProductParsedResult.java
│           │       │       │       ├── ExpandedProductResultParser.java
│           │       │       │       ├── GeoParsedResult.java
│           │       │       │       ├── GeoResultParser.java
│           │       │       │       ├── ISBNParsedResult.java
│           │       │       │       ├── ISBNResultParser.java
│           │       │       │       ├── ParsedResult.java
│           │       │       │       ├── ParsedResultType.java
│           │       │       │       ├── ProductParsedResult.java
│           │       │       │       ├── ProductResultParser.java
│           │       │       │       ├── ResultParser.java
│           │       │       │       ├── SMSMMSResultParser.java
│           │       │       │       ├── SMSParsedResult.java
│           │       │       │       ├── SMSTOMMSTOResultParser.java
│           │       │       │       ├── SMTPResultParser.java
│           │       │       │       ├── TelParsedResult.java
│           │       │       │       ├── TelResultParser.java
│           │       │       │       ├── TextParsedResult.java
│           │       │       │       ├── URIParsedResult.java
│           │       │       │       ├── URIResultParser.java
│           │       │       │       ├── URLTOResultParser.java
│           │       │       │       ├── VCardResultParser.java
│           │       │       │       ├── VEventResultParser.java
│           │       │       │       ├── VINParsedResult.java
│           │       │       │       ├── VINResultParser.java
│           │       │       │       ├── WifiParsedResult.java
│           │       │       │       └── WifiResultParser.java
│           │       │       ├── common/
│           │       │       │   ├── BitArray.java
│           │       │       │   ├── BitMatrix.java
│           │       │       │   ├── BitSource.java
│           │       │       │   ├── CharacterSetECI.java
│           │       │       │   ├── DecoderResult.java
│           │       │       │   ├── DefaultGridSampler.java
│           │       │       │   ├── DetectorResult.java
│           │       │       │   ├── GlobalHistogramBinarizer.java
│           │       │       │   ├── GridSampler.java
│           │       │       │   ├── HybridBinarizer.java
│           │       │       │   ├── PerspectiveTransform.java
│           │       │       │   ├── StringUtils.java
│           │       │       │   ├── detector/
│           │       │       │   │   ├── MathUtils.java
│           │       │       │   │   ├── MonochromeRectangleDetector.java
│           │       │       │   │   └── WhiteRectangleDetector.java
│           │       │       │   └── reedsolomon/
│           │       │       │       ├── GenericGF.java
│           │       │       │       ├── GenericGFPoly.java
│           │       │       │       ├── ReedSolomonDecoder.java
│           │       │       │       ├── ReedSolomonEncoder.java
│           │       │       │       └── ReedSolomonException.java
│           │       │       ├── datamatrix/
│           │       │       │   ├── DataMatrixReader.java
│           │       │       │   ├── DataMatrixWriter.java
│           │       │       │   ├── decoder/
│           │       │       │   │   ├── BitMatrixParser.java
│           │       │       │   │   ├── DataBlock.java
│           │       │       │   │   ├── DecodedBitStreamParser.java
│           │       │       │   │   ├── Decoder.java
│           │       │       │   │   └── Version.java
│           │       │       │   ├── detector/
│           │       │       │   │   └── Detector.java
│           │       │       │   └── encoder/
│           │       │       │       ├── ASCIIEncoder.java
│           │       │       │       ├── Base256Encoder.java
│           │       │       │       ├── C40Encoder.java
│           │       │       │       ├── DataMatrixSymbolInfo144.java
│           │       │       │       ├── DefaultPlacement.java
│           │       │       │       ├── EdifactEncoder.java
│           │       │       │       ├── Encoder.java
│           │       │       │       ├── EncoderContext.java
│           │       │       │       ├── ErrorCorrection.java
│           │       │       │       ├── HighLevelEncoder.java
│           │       │       │       ├── SymbolInfo.java
│           │       │       │       ├── SymbolShapeHint.java
│           │       │       │       ├── TextEncoder.java
│           │       │       │       └── X12Encoder.java
│           │       │       ├── maxicode/
│           │       │       │   ├── MaxiCodeReader.java
│           │       │       │   └── decoder/
│           │       │       │       ├── BitMatrixParser.java
│           │       │       │       ├── DecodedBitStreamParser.java
│           │       │       │       └── Decoder.java
│           │       │       ├── multi/
│           │       │       │   ├── ByQuadrantReader.java
│           │       │       │   ├── GenericMultipleBarcodeReader.java
│           │       │       │   ├── MultipleBarcodeReader.java
│           │       │       │   └── qrcode/
│           │       │       │       ├── QRCodeMultiReader.java
│           │       │       │       └── detector/
│           │       │       │           ├── MultiDetector.java
│           │       │       │           └── MultiFinderPatternFinder.java
│           │       │       ├── oned/
│           │       │       │   ├── CodaBarReader.java
│           │       │       │   ├── CodaBarWriter.java
│           │       │       │   ├── Code128Reader.java
│           │       │       │   ├── Code128Writer.java
│           │       │       │   ├── Code39Reader.java
│           │       │       │   ├── Code39Writer.java
│           │       │       │   ├── Code93Reader.java
│           │       │       │   ├── Code93Writer.java
│           │       │       │   ├── EAN13Reader.java
│           │       │       │   ├── EAN13Writer.java
│           │       │       │   ├── EAN8Reader.java
│           │       │       │   ├── EAN8Writer.java
│           │       │       │   ├── EANManufacturerOrgSupport.java
│           │       │       │   ├── ITFReader.java
│           │       │       │   ├── ITFWriter.java
│           │       │       │   ├── MultiFormatOneDReader.java
│           │       │       │   ├── MultiFormatUPCEANReader.java
│           │       │       │   ├── OneDReader.java
│           │       │       │   ├── OneDimensionalCodeWriter.java
│           │       │       │   ├── UPCAReader.java
│           │       │       │   ├── UPCAWriter.java
│           │       │       │   ├── UPCEANExtension2Support.java
│           │       │       │   ├── UPCEANExtension5Support.java
│           │       │       │   ├── UPCEANExtensionSupport.java
│           │       │       │   ├── UPCEANReader.java
│           │       │       │   ├── UPCEANWriter.java
│           │       │       │   ├── UPCEReader.java
│           │       │       │   ├── UPCEWriter.java
│           │       │       │   └── rss/
│           │       │       │       ├── AbstractRSSReader.java
│           │       │       │       ├── DataCharacter.java
│           │       │       │       ├── FinderPattern.java
│           │       │       │       ├── Pair.java
│           │       │       │       ├── RSS14Reader.java
│           │       │       │       ├── RSSUtils.java
│           │       │       │       └── expanded/
│           │       │       │           ├── BitArrayBuilder.java
│           │       │       │           ├── ExpandedPair.java
│           │       │       │           ├── ExpandedRow.java
│           │       │       │           ├── RSSExpandedReader.java
│           │       │       │           └── decoders/
│           │       │       │               ├── AI013103decoder.java
│           │       │       │               ├── AI01320xDecoder.java
│           │       │       │               ├── AI01392xDecoder.java
│           │       │       │               ├── AI01393xDecoder.java
│           │       │       │               ├── AI013x0x1xDecoder.java
│           │       │       │               ├── AI013x0xDecoder.java
│           │       │       │               ├── AI01AndOtherAIs.java
│           │       │       │               ├── AI01decoder.java
│           │       │       │               ├── AI01weightDecoder.java
│           │       │       │               ├── AbstractExpandedDecoder.java
│           │       │       │               ├── AnyAIDecoder.java
│           │       │       │               ├── BlockParsedResult.java
│           │       │       │               ├── CurrentParsingState.java
│           │       │       │               ├── DecodedChar.java
│           │       │       │               ├── DecodedInformation.java
│           │       │       │               ├── DecodedNumeric.java
│           │       │       │               ├── DecodedObject.java
│           │       │       │               ├── FieldParser.java
│           │       │       │               └── GeneralAppIdDecoder.java
│           │       │       ├── pdf417/
│           │       │       │   ├── PDF417Common.java
│           │       │       │   ├── PDF417Reader.java
│           │       │       │   ├── PDF417ResultMetadata.java
│           │       │       │   ├── PDF417Writer.java
│           │       │       │   ├── decoder/
│           │       │       │   │   ├── BarcodeMetadata.java
│           │       │       │   │   ├── BarcodeValue.java
│           │       │       │   │   ├── BoundingBox.java
│           │       │       │   │   ├── Codeword.java
│           │       │       │   │   ├── DecodedBitStreamParser.java
│           │       │       │   │   ├── DetectionResult.java
│           │       │       │   │   ├── DetectionResultColumn.java
│           │       │       │   │   ├── DetectionResultRowIndicatorColumn.java
│           │       │       │   │   ├── PDF417CodewordDecoder.java
│           │       │       │   │   ├── PDF417ScanningDecoder.java
│           │       │       │   │   └── ec/
│           │       │       │   │       ├── ErrorCorrection.java
│           │       │       │   │       ├── ModulusGF.java
│           │       │       │   │       └── ModulusPoly.java
│           │       │       │   ├── detector/
│           │       │       │   │   ├── Detector.java
│           │       │       │   │   └── PDF417DetectorResult.java
│           │       │       │   └── encoder/
│           │       │       │       ├── BarcodeMatrix.java
│           │       │       │       ├── BarcodeRow.java
│           │       │       │       ├── Compaction.java
│           │       │       │       ├── Dimensions.java
│           │       │       │       ├── PDF417.java
│           │       │       │       ├── PDF417ErrorCorrection.java
│           │       │       │       └── PDF417HighLevelEncoder.java
│           │       │       └── qrcode/
│           │       │           ├── QRCodeReader.java
│           │       │           ├── QRCodeWriter.java
│           │       │           ├── decoder/
│           │       │           │   ├── BitMatrixParser.java
│           │       │           │   ├── DataBlock.java
│           │       │           │   ├── DataMask.java
│           │       │           │   ├── DecodedBitStreamParser.java
│           │       │           │   ├── Decoder.java
│           │       │           │   ├── ErrorCorrectionLevel.java
│           │       │           │   ├── FormatInformation.java
│           │       │           │   ├── Mode.java
│           │       │           │   ├── QRCodeDecoderMetaData.java
│           │       │           │   └── Version.java
│           │       │           ├── detector/
│           │       │           │   ├── AlignmentPattern.java
│           │       │           │   ├── AlignmentPatternFinder.java
│           │       │           │   ├── Detector.java
│           │       │           │   ├── FinderPattern.java
│           │       │           │   ├── FinderPatternFinder.java
│           │       │           │   └── FinderPatternInfo.java
│           │       │           └── encoder/
│           │       │               ├── BlockPair.java
│           │       │               ├── ByteMatrix.java
│           │       │               ├── Encoder.java
│           │       │               ├── MaskUtil.java
│           │       │               ├── MatrixUtil.java
│           │       │               └── QRCode.java
│           │       └── nanchen/
│           │           └── scanner/
│           │               ├── module/
│           │               │   └── CaptureActivity.java
│           │               ├── utils/
│           │               │   ├── PermissionConstants.java
│           │               │   ├── PermissionUtils.java
│           │               │   ├── QRUtils.java
│           │               │   └── ScreenUtils.java
│           │               └── zxing/
│           │                   ├── AmbientLightManager.java
│           │                   ├── BaseCaptureActivity.java
│           │                   ├── BeepManager.java
│           │                   ├── CaptureActivityHandler.java
│           │                   ├── Contents.java
│           │                   ├── DecodeFormatManager.java
│           │                   ├── DecodeHandler.java
│           │                   ├── DecodeHintManager.java
│           │                   ├── DecodeThread.java
│           │                   ├── FinishListener.java
│           │                   ├── InactivityTimer.java
│           │                   ├── Intents.java
│           │                   ├── ViewfinderResultPointCallback.java
│           │                   ├── ViewfinderView.java
│           │                   └── camera/
│           │                       ├── AutoFocusManager.java
│           │                       ├── CameraConfigurationManager.java
│           │                       ├── CameraConfigurationUtils.java
│           │                       ├── CameraManager.java
│           │                       ├── FrontLightMode.java
│           │                       ├── PreviewCallback.java
│           │                       └── open/
│           │                           ├── CameraFacing.java
│           │                           ├── OpenCamera.java
│           │                           └── OpenCameraInterface.java
│           └── res/
│               ├── color/
│               │   └── dialog_pro_color.xml
│               ├── drawable/
│               │   └── shape_dialog_bg.xml
│               ├── layout/
│               │   ├── activity_capture.xml
│               │   └── dialog_loading.xml
│               ├── raw/
│               │   └── beep.ogg
│               ├── values/
│               │   ├── colors.xml
│               │   ├── dimens.xml
│               │   ├── ids.xml
│               │   ├── strings.xml
│               │   └── styles.xml
│               ├── values-ja/
│               │   └── strings.xml
│               └── xml/
│                   └── preferences.xml
└── settings.gradle

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
/app/build
/scanner/build


================================================
FILE: .idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <Objective-C-extensions>
      <file>
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
      </file>
      <class>
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
      </class>
      <extensions>
        <pair source="cpp" header="h" fileNamingConvention="NONE" />
        <pair source="c" header="h" fileNamingConvention="NONE" />
      </extensions>
    </Objective-C-extensions>
  </code_scheme>
</component>

================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
            <option value="$PROJECT_DIR$/scanner" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>

================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="NullableNotNullManager">
    <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
    <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
    <option name="myNullables">
      <value>
        <list size="7">
          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
          <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
          <item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
          <item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
          <item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
          <item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
          <item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
        </list>
      </value>
    </option>
    <option name="myNotNulls">
      <value>
        <list size="6">
          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
          <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
          <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
          <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
          <item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
          <item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
        </list>
      </value>
    </option>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
    <option name="id" value="Android" />
  </component>
</project>

================================================
FILE: .idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RunConfigurationProducerService">
    <option name="ignoredProducers">
      <set>
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
      </set>
    </option>
  </component>
</project>

================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>

================================================
FILE: README.md
================================================
# AiYaScanner
:fire: zxing and zbar combined with scan code.  只为真正的 zxing zbar 结合二维码扫描:https://github.com/nanchen2251/AiYaScanner

TODO:
1. 剥离 zxing(已完成);
2. 优化 zxing 预览和解码(已完成);
3. 加入 zbar 解码(已完成);
4. 兼容优化;(部分完成);
5. 二维码放大缩小(已完成);
6. 目前解码为了兼容,是串行的,相反拖长了时间,后面会改成并行的。
7. 自动放缩;
8. 目前为了速度,**仅支持二维码**,后面暴露接口支持其他格式;

**更多有效的优化,请大家一起来提 PR!**
**有任何需求或者 BUG,请提 issues!**


## 效果图<br>
![](https://github.com/nanchen2251/AiYaScanner/blob/master/screenshot/screenshot.gif)

#### ⊙开源不易,希望给个 star 或者 fork 奖励
#### ⊙拥抱开源:https://github.com/nanchen2251/
#### ⊙交流群(拒绝无脑问):118116509 <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=e6ad4af66393684e1d0c9441403b049d2d5670ec0ce9f72150e694cbb7c16b0a"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="Android神技侧漏交流群" title="Android神技侧漏交流群"></a>( 点击图标即可加入 )<br>

## 特点
  1、只为极速扫码而生。<br>
  2、默认只支持二维码扫描。<br>
  3、支持双击放大缩小。<br>
  4、支持多指放大缩小。<br>
## 使用方法
#### 1、添加依赖<br>
##### Step 1. Add it in your root build.gradle at the end of repositories:
```java
allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
```
##### Step 2. Add the dependency
```java
dependencies {
	        implementation 'com.github.nanchen2251:AiYaScanner:1.0.7'
	}
```
#### 2、在Activity里面使用<br>
```java
   // 必须自己先申请相机和存储权限
   CaptureActivity.startForResult(MainActivity.this, 1024);
   
   @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK && requestCode == 1024 && data != null) {
            String result = data.getStringExtra("result");
            Toast.makeText(getApplicationContext(), "扫码结果:" + result, Toast.LENGTH_SHORT).show();
        }
    }
```
#### 3、你也可以自己编写你的扫一扫 UI
```
// Activity 请继承于 BaseCaptureActivity
// 你也可以不继承,但记得编写相关方法
```

该项目参考了:

* [https://github.com/zxing/zxing](https://github.com/zxing/zxing) 
* [https://github.com/ZBar/ZBar](https://github.com/ZBar/ZBar)

### 关于作者
    南尘<br>
    四川成都<br>
    [其它开源](https://github.com/nanchen2251/)<br>
    [个人博客](https://nanchen2251.github.io/)<br>
    [简书](http://www.jianshu.com/u/f690947ed5a6)<br>
    [博客园](http://www.cnblogs.com/liushilin/)<br>
    交流群:118116509<br>
    欢迎投稿(关注)我的唯一公众号,公众号搜索 nanchen 或者扫描下方二维码:<br>
    ![](https://github.com/nanchen2251/Blogs/blob/master/images/nanchen12.jpg)


#### 有码走遍天下 无码寸步难行(引自网络)

> 1024 - 梦想,永不止步!  
爱编程 不爱Bug  
爱加班 不爱黑眼圈  
固执 但不偏执  
疯狂 但不疯癫  
生活里的菜鸟  
工作中的大神  
身怀宝藏,一心憧憬星辰大海  
追求极致,目标始于高山之巅  
一群怀揣好奇,梦想改变世界的孩子  
一群追日逐浪,正在改变世界的极客  
你们用最美的语言,诠释着科技的力量  
你们用极速的创新,引领着时代的变迁  
  
------至所有正在努力奋斗的程序猿们!加油!!  
    
## Licenses
```
 Copyright 2019 nanchen(刘世麟)

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
```


================================================
FILE: app/.gitignore
================================================
/build


================================================
FILE: app/build.gradle
================================================
apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.nanchen.aiyascanner"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation project(':scanner')
    implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
}


================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: app/src/androidTest/java/com/nanchen/aiyascanner/ExampleInstrumentedTest.java
================================================
package com.nanchen.aiyascanner;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
 * Instrumented test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("com.nanchen.aiyascanner", appContext.getPackageName());
    }
}


================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nanchen.aiyascanner">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

================================================
FILE: app/src/main/java/com/nanchen/aiyascanner/MainActivity.java
================================================
package com.nanchen.aiyascanner;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.nanchen.scanner.module.CaptureActivity;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.text).setOnClickListener(new View.OnClickListener() {
            @SuppressLint("CheckResult")
            @Override
            public void onClick(View v) {
                CaptureActivity.startForResult(MainActivity.this, 1024);
            }
        });
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK && requestCode == 1024 && data != null) {
            String result = data.getStringExtra("result");
            Toast.makeText(getApplicationContext(), "扫码结果:" + result, Toast.LENGTH_SHORT).show();
        }
    }
}


================================================
FILE: app/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path
        android:fillColor="#008577"
        android:pathData="M0,0h108v108h-108z" />
    <path
        android:fillColor="#00000000"
        android:pathData="M9,0L9,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,0L19,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,0L29,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,0L39,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,0L49,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,0L59,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,0L69,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,0L79,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M89,0L89,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M99,0L99,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,9L108,9"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,19L108,19"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,29L108,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,39L108,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,49L108,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,59L108,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,69L108,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,79L108,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,89L108,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,99L108,99"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,29L89,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,39L89,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,49L89,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,59L89,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,69L89,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,79L89,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,19L29,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,19L39,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,19L49,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,19L59,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,19L69,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,19L79,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
</vector>


================================================
FILE: app/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path
        android:fillType="evenOdd"
        android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
        android:strokeWidth="1"
        android:strokeColor="#00000000">
        <aapt:attr name="android:fillColor">
            <gradient
                android:endX="78.5885"
                android:endY="90.9159"
                android:startX="48.7653"
                android:startY="61.0927"
                android:type="linear">
                <item
                    android:color="#44000000"
                    android:offset="0.0" />
                <item
                    android:color="#00000000"
                    android:offset="1.0" />
            </gradient>
        </aapt:attr>
    </path>
    <path
        android:fillColor="#FFFFFF"
        android:fillType="nonZero"
        android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
        android:strokeWidth="1"
        android:strokeColor="#00000000" />
</vector>


================================================
FILE: app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <Button
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/scanner_test"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

================================================
FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

================================================
FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

================================================
FILE: app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#008577</color>
    <color name="colorPrimaryDark">#00574B</color>
    <color name="colorAccent">#D81B60</color>
    <color name="white">#ffffff</color>
</resources>


================================================
FILE: app/src/main/res/values/dimens.xml
================================================
<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>


</resources>


================================================
FILE: app/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">AiYaScanner</string>
    <string name="scanner_test">点击测试扫一扫!</string>

</resources>


================================================
FILE: app/src/main/res/values/styles.xml
================================================
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>


================================================
FILE: app/src/test/java/com/nanchen/aiyascanner/ExampleUnitTest.java
================================================
package com.nanchen.aiyascanner;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
public class ExampleUnitTest {
    @Test
    public void addition_isCorrect() {
        assertEquals(4, 2 + 2);
    }
}

================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true




================================================
FILE: gradlew
================================================
#!/usr/bin/env sh

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
  cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"


================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: scanner/.gitignore
================================================
/build


================================================
FILE: scanner/build.gradle
================================================
apply plugin: 'com.android.library'

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 6
        versionName "1.0.6"
        ndk {
            abiFilters "armeabi"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation files('libs/zbar-1.0.0.jar')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    // 把 google 的 core 库直接引入
    //    api 'com.google.zxing:core:3.3.3'
}


================================================
FILE: scanner/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: scanner/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nanchen.scanner">

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.FLASHLIGHT" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />

    <uses-feature android:name="android.hardware.camera.any" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.flash"
        android:required="false" />

    <application>

        <activity
            android:name=".module.CaptureActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".utils.PermissionUtils$PermissionActivity"
            android:theme="@style/ActivityTranslucent" />
    </application>
</manifest>


================================================
FILE: scanner/src/main/java/com/google/zxing/BarcodeFormat.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Enumerates barcode formats known to this package. Please keep alphabetized.
 *
 * @author Sean Owen
 */
public enum BarcodeFormat {

  /** Aztec 2D barcode format. */
  AZTEC,

  /** CODABAR 1D format. */
  CODABAR,

  /** Code 39 1D format. */
  CODE_39,

  /** Code 93 1D format. */
  CODE_93,

  /** Code 128 1D format. */
  CODE_128,

  /** Data Matrix 2D barcode format. */
  DATA_MATRIX,

  /** EAN-8 1D format. */
  EAN_8,

  /** EAN-13 1D format. */
  EAN_13,

  /** ITF (Interleaved Two of Five) 1D format. */
  ITF,

  /** MaxiCode 2D barcode format. */
  MAXICODE,

  /** PDF417 format. */
  PDF_417,

  /** QR Code 2D barcode format. */
  QR_CODE,

  /** RSS 14 */
  RSS_14,

  /** RSS EXPANDED */
  RSS_EXPANDED,

  /** UPC-A 1D format. */
  UPC_A,

  /** UPC-E 1D format. */
  UPC_E,

  /** UPC/EAN extension format. Not a stand-alone format. */
  UPC_EAN_EXTENSION

}


================================================
FILE: scanner/src/main/java/com/google/zxing/Binarizer.java
================================================
/*
 * Copyright 2009 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import com.google.zxing.common.BitArray;
import com.google.zxing.common.BitMatrix;

/**
 * This class hierarchy provides a set of methods to convert luminance data to 1 bit data.
 * It allows the algorithm to vary polymorphically, for example allowing a very expensive
 * thresholding technique for servers and a fast one for mobile. It also permits the implementation
 * to vary, e.g. a JNI version for Android and a Java fallback version for other platforms.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public abstract class Binarizer {

  private final LuminanceSource source;

  protected Binarizer(LuminanceSource source) {
    this.source = source;
  }

  public final LuminanceSource getLuminanceSource() {
    return source;
  }

  /**
   * Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
   * cached data. Callers should assume this method is expensive and call it as seldom as possible.
   * This method is intended for decoding 1D barcodes and may choose to apply sharpening.
   * For callers which only examine one row of pixels at a time, the same BitArray should be reused
   * and passed in with each call for performance. However it is legal to keep more than one row
   * at a time if needed.
   *
   * @param y The row to fetch, which must be in [0, bitmap height)
   * @param row An optional preallocated array. If null or too small, it will be ignored.
   *            If used, the Binarizer will call BitArray.clear(). Always use the returned object.
   * @return The array of bits for this row (true means black).
   * @throws NotFoundException if row can't be binarized
   */
  public abstract BitArray getBlackRow(int y, BitArray row) throws NotFoundException;

  /**
   * Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive
   * and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
   * may not apply sharpening. Therefore, a row from this matrix may not be identical to one
   * fetched using getBlackRow(), so don't mix and match between them.
   *
   * @return The 2D array of bits for the image (true means black).
   * @throws NotFoundException if image can't be binarized to make a matrix
   */
  public abstract BitMatrix getBlackMatrix() throws NotFoundException;

  /**
   * Creates a new object with the same type as this Binarizer implementation, but with pristine
   * state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
   * of 1 bit data. See Effective Java for why we can't use Java's clone() method.
   *
   * @param source The LuminanceSource this Binarizer will operate on.
   * @return A new concrete Binarizer implementation object.
   */
  public abstract Binarizer createBinarizer(LuminanceSource source);

  public final int getWidth() {
    return source.getWidth();
  }

  public final int getHeight() {
    return source.getHeight();
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/BinaryBitmap.java
================================================
/*
 * Copyright 2009 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import com.google.zxing.common.BitArray;
import com.google.zxing.common.BitMatrix;

/**
 * This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects
 * accept a BinaryBitmap and attempt to decode it.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class BinaryBitmap {

  private final Binarizer binarizer;
  private BitMatrix matrix;

  public BinaryBitmap(Binarizer binarizer) {
    if (binarizer == null) {
      throw new IllegalArgumentException("Binarizer must be non-null.");
    }
    this.binarizer = binarizer;
  }

  /**
   * @return The width of the bitmap.
   */
  public int getWidth() {
    return binarizer.getWidth();
  }

  /**
   * @return The height of the bitmap.
   */
  public int getHeight() {
    return binarizer.getHeight();
  }

  /**
   * Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
   * cached data. Callers should assume this method is expensive and call it as seldom as possible.
   * This method is intended for decoding 1D barcodes and may choose to apply sharpening.
   *
   * @param y The row to fetch, which must be in [0, bitmap height)
   * @param row An optional preallocated array. If null or too small, it will be ignored.
   *            If used, the Binarizer will call BitArray.clear(). Always use the returned object.
   * @return The array of bits for this row (true means black).
   * @throws NotFoundException if row can't be binarized
   */
  public BitArray getBlackRow(int y, BitArray row) throws NotFoundException {
    return binarizer.getBlackRow(y, row);
  }

  /**
   * Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive
   * and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
   * may not apply sharpening. Therefore, a row from this matrix may not be identical to one
   * fetched using getBlackRow(), so don't mix and match between them.
   *
   * @return The 2D array of bits for the image (true means black).
   * @throws NotFoundException if image can't be binarized to make a matrix
   */
  public BitMatrix getBlackMatrix() throws NotFoundException {
    // The matrix is created on demand the first time it is requested, then cached. There are two
    // reasons for this:
    // 1. This work will never be done if the caller only installs 1D Reader objects, or if a
    //    1D Reader finds a barcode before the 2D Readers run.
    // 2. This work will only be done once even if the caller installs multiple 2D Readers.
    if (matrix == null) {
      matrix = binarizer.getBlackMatrix();
    }
    return matrix;
  }

  /**
   * @return Whether this bitmap can be cropped.
   */
  public boolean isCropSupported() {
    return binarizer.getLuminanceSource().isCropSupported();
  }

  /**
   * Returns a new object with cropped image data. Implementations may keep a reference to the
   * original data rather than a copy. Only callable if isCropSupported() is true.
   *
   * @param left The left coordinate, which must be in [0,getWidth())
   * @param top The top coordinate, which must be in [0,getHeight())
   * @param width The width of the rectangle to crop.
   * @param height The height of the rectangle to crop.
   * @return A cropped version of this object.
   */
  public BinaryBitmap crop(int left, int top, int width, int height) {
    LuminanceSource newSource = binarizer.getLuminanceSource().crop(left, top, width, height);
    return new BinaryBitmap(binarizer.createBinarizer(newSource));
  }

  /**
   * @return Whether this bitmap supports counter-clockwise rotation.
   */
  public boolean isRotateSupported() {
    return binarizer.getLuminanceSource().isRotateSupported();
  }

  /**
   * Returns a new object with rotated image data by 90 degrees counterclockwise.
   * Only callable if {@link #isRotateSupported()} is true.
   *
   * @return A rotated version of this object.
   */
  public BinaryBitmap rotateCounterClockwise() {
    LuminanceSource newSource = binarizer.getLuminanceSource().rotateCounterClockwise();
    return new BinaryBitmap(binarizer.createBinarizer(newSource));
  }

  /**
   * Returns a new object with rotated image data by 45 degrees counterclockwise.
   * Only callable if {@link #isRotateSupported()} is true.
   *
   * @return A rotated version of this object.
   */
  public BinaryBitmap rotateCounterClockwise45() {
    LuminanceSource newSource = binarizer.getLuminanceSource().rotateCounterClockwise45();
    return new BinaryBitmap(binarizer.createBinarizer(newSource));
  }

  @Override
  public String toString() {
    try {
      return getBlackMatrix().toString();
    } catch (NotFoundException e) {
      return "";
    }
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/ChecksumException.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Thrown when a barcode was successfully detected and decoded, but
 * was not returned because its checksum feature failed.
 *
 * @author Sean Owen
 */
public final class ChecksumException extends ReaderException {

  private static final ChecksumException INSTANCE = new ChecksumException();
  static {
    INSTANCE.setStackTrace(NO_TRACE); // since it's meaningless
  }

  private ChecksumException() {
    // do nothing
  }

  private ChecksumException(Throwable cause) {
    super(cause);
  }

  public static ChecksumException getChecksumInstance() {
    return isStackTrace ? new ChecksumException() : INSTANCE;
  }

  public static ChecksumException getChecksumInstance(Throwable cause) {
    return isStackTrace ? new ChecksumException(cause) : INSTANCE;
  }
}

================================================
FILE: scanner/src/main/java/com/google/zxing/DecodeHintType.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import java.util.List;

/**
 * Encapsulates a type of hint that a caller may pass to a barcode reader to help it
 * more quickly or accurately decode it. It is up to implementations to decide what,
 * if anything, to do with the information that is supplied.
 *
 * @author Sean Owen
 * @author dswitkin@google.com (Daniel Switkin)
 * @see Reader#decode(BinaryBitmap,java.util.Map)
 */
public enum DecodeHintType {

  /**
   * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
   */
  OTHER(Object.class),

  /**
   * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
   * use {@link Boolean#TRUE}.
   */
  PURE_BARCODE(Void.class),

  /**
   * Image is known to be of one of a few possible formats.
   * Maps to a {@link List} of {@link BarcodeFormat}s.
   */
  POSSIBLE_FORMATS(List.class),

  /**
   * Spend more time to try to find a barcode; optimize for accuracy, not speed.
   * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
   */
  TRY_HARDER(Void.class),

  /**
   * Specifies what character encoding to use when decoding, where applicable (type String)
   */
  CHARACTER_SET(String.class),

  /**
   * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
   */
  ALLOWED_LENGTHS(int[].class),

  /**
   * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
   * use {@link Boolean#TRUE}.
   */
  ASSUME_CODE_39_CHECK_DIGIT(Void.class),

  /**
   * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
   * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
   * use {@link Boolean#TRUE}.
   */
  ASSUME_GS1(Void.class),

  /**
   * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
   * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
   * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
   */
  RETURN_CODABAR_START_END(Void.class),

  /**
   * The caller needs to be notified via callback when a possible {@link ResultPoint}
   * is found. Maps to a {@link ResultPointCallback}.
   */
  NEED_RESULT_POINT_CALLBACK(ResultPointCallback.class),


  /**
   * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
   * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
   * If it is optional to have an extension, do not set this hint. If this is set,
   * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
   * at all.
   */
  ALLOWED_EAN_EXTENSIONS(int[].class),

  // End of enumeration values.
  ;

  /**
   * Data type the hint is expecting.
   * Among the possible values the {@link Void} stands out as being used for
   * hints that do not expect a value to be supplied (flag hints). Such hints
   * will possibly have their value ignored, or replaced by a
   * {@link Boolean#TRUE}. Hint suppliers should probably use
   * {@link Boolean#TRUE} as directed by the actual hint documentation.
   */
  private final Class<?> valueType;

  DecodeHintType(Class<?> valueType) {
    this.valueType = valueType;
  }

  public Class<?> getValueType() {
    return valueType;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/Dimension.java
================================================
/*
 * Copyright 2012 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Simply encapsulates a width and height.
 */
public final class Dimension {

  private final int width;
  private final int height;

  public Dimension(int width, int height) {
    if (width < 0 || height < 0) {
      throw new IllegalArgumentException();
    }
    this.width = width;
    this.height = height;
  }

  public int getWidth() {
    return width;
  }

  public int getHeight() {
    return height;
  }

  @Override
  public boolean equals(Object other) {
    if (other instanceof Dimension) {
      Dimension d = (Dimension) other;
      return width == d.width && height == d.height;
    }
    return false;
  }

  @Override
  public int hashCode() {
      return width * 32713 + height;
  }

  @Override
  public String toString() {
    return width + "x" + height;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/EncodeHintType.java
================================================
/*
 * Copyright 2008 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * These are a set of hints that you may pass to Writers to specify their behavior.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public enum EncodeHintType {

  /**
   * Specifies what degree of error correction to use, for example in QR Codes.
   * Type depends on the encoder. For example for QR codes it's type
   * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
   * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
   * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
   * In all cases, it can also be a {@link String} representation of the desired value as well.
   * Note: an Aztec symbol should have a minimum of 25% EC words.
   */
  ERROR_CORRECTION,

  /**
   * Specifies what character encoding to use where applicable (type {@link String})
   */
  CHARACTER_SET,

  /**
   * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
   */
  DATA_MATRIX_SHAPE,

  /**
   * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
   *
   * @deprecated use width/height params in
   * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
   */
  @Deprecated
  MIN_SIZE,

  /**
   * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
   *
   * @deprecated without replacement
   */
  @Deprecated
  MAX_SIZE,

  /**
   * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
   * by format; for example it controls margin before and after the barcode horizontally for
   * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
   */
  MARGIN,

  /**
   * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
   * {@link String} value).
   */
  PDF417_COMPACT,

  /**
   * Specifies what compaction mode to use for PDF417 (type
   * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
   * enum values).
   */
  PDF417_COMPACTION,

  /**
   * Specifies the minimum and maximum number of rows and columns for PDF417 (type
   * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
   */
  PDF417_DIMENSIONS,

  /**
   * Specifies the required number of layers for an Aztec code.
   * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
   * 0 indicates to use the minimum number of layers (the default).
   * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
   * (Type {@link Integer}, or {@link String} representation of the integer value).
   */
   AZTEC_LAYERS,

   /**
    * Specifies the exact version of QR code to be encoded.
    * (Type {@link Integer}, or {@link String} representation of the integer value).
    */
   QR_VERSION,

  /**
   * Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or "true" or "false"
   * {@link String } value).
   */
  GS1_FORMAT,
}


================================================
FILE: scanner/src/main/java/com/google/zxing/FormatException.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Thrown when a barcode was successfully detected, but some aspect of
 * the content did not conform to the barcode's format rules. This could have
 * been due to a mis-detection.
 *
 * @author Sean Owen
 */
public final class FormatException extends ReaderException {

  private static final FormatException INSTANCE = new FormatException();
  static {
    INSTANCE.setStackTrace(NO_TRACE); // since it's meaningless
  }

  private FormatException() {
  }

  private FormatException(Throwable cause) {
    super(cause);
  }

  public static FormatException getFormatInstance() {
    return isStackTrace ? new FormatException() : INSTANCE;
  }

  public static FormatException getFormatInstance(Throwable cause) {
    return isStackTrace ? new FormatException(cause) : INSTANCE;
  }
}


================================================
FILE: scanner/src/main/java/com/google/zxing/InvertedLuminanceSource.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes
 * white and vice versa, and each value becomes (255-value).
 *
 * @author Sean Owen
 */
public final class InvertedLuminanceSource extends LuminanceSource {

  private final LuminanceSource delegate;

  public InvertedLuminanceSource(LuminanceSource delegate) {
    super(delegate.getWidth(), delegate.getHeight());
    this.delegate = delegate;
  }

  @Override
  public byte[] getRow(int y, byte[] row) {
    row = delegate.getRow(y, row);
    int width = getWidth();
    for (int i = 0; i < width; i++) {
      row[i] = (byte) (255 - (row[i] & 0xFF));
    }
    return row;
  }

  @Override
  public byte[] getMatrix() {
    byte[] matrix = delegate.getMatrix();
    int length = getWidth() * getHeight();
    byte[] invertedMatrix = new byte[length];
    for (int i = 0; i < length; i++) {
      invertedMatrix[i] = (byte) (255 - (matrix[i] & 0xFF));
    }
    return invertedMatrix;
  }

  @Override
  public boolean isCropSupported() {
    return delegate.isCropSupported();
  }

  @Override
  public LuminanceSource crop(int left, int top, int width, int height) {
    return new InvertedLuminanceSource(delegate.crop(left, top, width, height));
  }

  @Override
  public boolean isRotateSupported() {
    return delegate.isRotateSupported();
  }

  /**
   * @return original delegate {@link LuminanceSource} since invert undoes itself
   */
  @Override
  public LuminanceSource invert() {
    return delegate;
  }

  @Override
  public LuminanceSource rotateCounterClockwise() {
    return new InvertedLuminanceSource(delegate.rotateCounterClockwise());
  }

  @Override
  public LuminanceSource rotateCounterClockwise45() {
    return new InvertedLuminanceSource(delegate.rotateCounterClockwise45());
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/LuminanceSource.java
================================================
/*
 * Copyright 2009 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * The purpose of this class hierarchy is to abstract different bitmap implementations across
 * platforms into a standard interface for requesting greyscale luminance values. The interface
 * only provides immutable methods; therefore crop and rotation create copies. This is to ensure
 * that one Reader does not modify the original luminance source and leave it in an unknown state
 * for other Readers in the chain.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public abstract class LuminanceSource {

  private final int width;
  private final int height;

  protected LuminanceSource(int width, int height) {
    this.width = width;
    this.height = height;
  }

  /**
   * Fetches one row of luminance data from the underlying platform's bitmap. Values range from
   * 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
   * to bitwise and with 0xff for each value. It is preferable for implementations of this method
   * to only fetch this row rather than the whole image, since no 2D Readers may be installed and
   * getMatrix() may never be called.
   *
   * @param y The row to fetch, which must be in [0,getHeight())
   * @param row An optional preallocated array. If null or too small, it will be ignored.
   *            Always use the returned object, and ignore the .length of the array.
   * @return An array containing the luminance data.
   */
  public abstract byte[] getRow(int y, byte[] row);

  /**
   * Fetches luminance data for the underlying bitmap. Values should be fetched using:
   * {@code int luminance = array[y * width + x] & 0xff}
   *
   * @return A row-major 2D array of luminance values. Do not use result.length as it may be
   *         larger than width * height bytes on some platforms. Do not modify the contents
   *         of the result.
   */
  public abstract byte[] getMatrix();

  /**
   * @return The width of the bitmap.
   */
  public final int getWidth() {
    return width;
  }

  /**
   * @return The height of the bitmap.
   */
  public final int getHeight() {
    return height;
  }

  /**
   * @return Whether this subclass supports cropping.
   */
  public boolean isCropSupported() {
    return false;
  }

  /**
   * Returns a new object with cropped image data. Implementations may keep a reference to the
   * original data rather than a copy. Only callable if isCropSupported() is true.
   *
   * @param left The left coordinate, which must be in [0,getWidth())
   * @param top The top coordinate, which must be in [0,getHeight())
   * @param width The width of the rectangle to crop.
   * @param height The height of the rectangle to crop.
   * @return A cropped version of this object.
   */
  public LuminanceSource crop(int left, int top, int width, int height) {
    throw new UnsupportedOperationException("This luminance source does not support cropping.");
  }

  /**
   * @return Whether this subclass supports counter-clockwise rotation.
   */
  public boolean isRotateSupported() {
    return false;
  }

  /**
   * @return a wrapper of this {@code LuminanceSource} which inverts the luminances it returns -- black becomes
   *  white and vice versa, and each value becomes (255-value).
   */
  public LuminanceSource invert() {
    return new InvertedLuminanceSource(this);
  }

  /**
   * Returns a new object with rotated image data by 90 degrees counterclockwise.
   * Only callable if {@link #isRotateSupported()} is true.
   *
   * @return A rotated version of this object.
   */
  public LuminanceSource rotateCounterClockwise() {
    throw new UnsupportedOperationException("This luminance source does not support rotation by 90 degrees.");
  }

  /**
   * Returns a new object with rotated image data by 45 degrees counterclockwise.
   * Only callable if {@link #isRotateSupported()} is true.
   *
   * @return A rotated version of this object.
   */
  public LuminanceSource rotateCounterClockwise45() {
    throw new UnsupportedOperationException("This luminance source does not support rotation by 45 degrees.");
  }

  @Override
  public final String toString() {
    byte[] row = new byte[width];
    StringBuilder result = new StringBuilder(height * (width + 1));
    for (int y = 0; y < height; y++) {
      row = getRow(y, row);
      for (int x = 0; x < width; x++) {
        int luminance = row[x] & 0xFF;
        char c;
        if (luminance < 0x40) {
          c = '#';
        } else if (luminance < 0x80) {
          c = '+';
        } else if (luminance < 0xC0) {
          c = '.';
        } else {
          c = ' ';
        }
        result.append(c);
      }
      result.append('\n');
    }
    return result.toString();
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/MultiFormatReader.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import com.google.zxing.aztec.AztecReader;
import com.google.zxing.datamatrix.DataMatrixReader;
import com.google.zxing.maxicode.MaxiCodeReader;
import com.google.zxing.oned.MultiFormatOneDReader;
import com.google.zxing.pdf417.PDF417Reader;
import com.google.zxing.qrcode.QRCodeReader;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;

/**
 * MultiFormatReader is a convenience class and the main entry point into the library for most uses.
 * By default it attempts to decode all barcode formats that the library supports. Optionally, you
 * can provide a hints object to request different behavior, for example only decoding QR codes.
 *
 * @author Sean Owen
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class MultiFormatReader implements Reader {

  private static final Reader[] EMPTY_READER_ARRAY = new Reader[0];

  private Map<DecodeHintType,?> hints;
  private Reader[] readers;

  /**
   * This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it
   * passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly.
   * Use setHints() followed by decodeWithState() for continuous scan applications.
   *
   * @param image The pixel data to decode
   * @return The contents of the image
   * @throws NotFoundException Any errors which occurred
   */
  @Override
  public Result decode(BinaryBitmap image) throws NotFoundException {
    setHints(null);
    return decodeInternal(image);
  }

  /**
   * Decode an image using the hints provided. Does not honor existing state.
   *
   * @param image The pixel data to decode
   * @param hints The hints to use, clearing the previous state.
   * @return The contents of the image
   * @throws NotFoundException Any errors which occurred
   */
  @Override
  public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException {
    setHints(hints);
    return decodeInternal(image);
  }

  /**
   * Decode an image using the state set up by calling setHints() previously. Continuous scan
   * clients will get a <b>large</b> speed increase by using this instead of decode().
   *
   * @param image The pixel data to decode
   * @return The contents of the image
   * @throws NotFoundException Any errors which occurred
   */
  public Result decodeWithState(BinaryBitmap image) throws NotFoundException {
    // Make sure to set up the default state so we don't crash
    if (readers == null) {
      setHints(null);
    }
    return decodeInternal(image);
  }

  /**
   * This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls
   * to decodeWithState(image) can reuse the same set of readers without reallocating memory. This
   * is important for performance in continuous scan clients.
   *
   * @param hints The set of hints to use for subsequent calls to decode(image)
   */
  public void setHints(Map<DecodeHintType,?> hints) {
    this.hints = hints;

    boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);
    @SuppressWarnings("unchecked")
    Collection<BarcodeFormat> formats =
        hints == null ? null : (Collection<BarcodeFormat>) hints.get(DecodeHintType.POSSIBLE_FORMATS);
    Collection<Reader> readers = new ArrayList<>();
    if (formats != null) {
      boolean addOneDReader =
          formats.contains(BarcodeFormat.UPC_A) ||
          formats.contains(BarcodeFormat.UPC_E) ||
          formats.contains(BarcodeFormat.EAN_13) ||
          formats.contains(BarcodeFormat.EAN_8) ||
          formats.contains(BarcodeFormat.CODABAR) ||
          formats.contains(BarcodeFormat.CODE_39) ||
          formats.contains(BarcodeFormat.CODE_93) ||
          formats.contains(BarcodeFormat.CODE_128) ||
          formats.contains(BarcodeFormat.ITF) ||
          formats.contains(BarcodeFormat.RSS_14) ||
          formats.contains(BarcodeFormat.RSS_EXPANDED);
      // Put 1D readers upfront in "normal" mode
      if (addOneDReader && !tryHarder) {
        readers.add(new MultiFormatOneDReader(hints));
      }
      if (formats.contains(BarcodeFormat.QR_CODE)) {
        readers.add(new QRCodeReader());
      }
      if (formats.contains(BarcodeFormat.DATA_MATRIX)) {
        readers.add(new DataMatrixReader());
      }
      if (formats.contains(BarcodeFormat.AZTEC)) {
        readers.add(new AztecReader());
      }
      if (formats.contains(BarcodeFormat.PDF_417)) {
         readers.add(new PDF417Reader());
      }
      if (formats.contains(BarcodeFormat.MAXICODE)) {
         readers.add(new MaxiCodeReader());
      }
      // At end in "try harder" mode
      if (addOneDReader && tryHarder) {
        readers.add(new MultiFormatOneDReader(hints));
      }
    }
    if (readers.isEmpty()) {
      if (!tryHarder) {
        readers.add(new MultiFormatOneDReader(hints));
      }

      readers.add(new QRCodeReader());
      readers.add(new DataMatrixReader());
      readers.add(new AztecReader());
      readers.add(new PDF417Reader());
      readers.add(new MaxiCodeReader());

      if (tryHarder) {
        readers.add(new MultiFormatOneDReader(hints));
      }
    }
    this.readers = readers.toArray(EMPTY_READER_ARRAY);
  }

  @Override
  public void reset() {
    if (readers != null) {
      for (Reader reader : readers) {
        reader.reset();
      }
    }
  }

  private Result decodeInternal(BinaryBitmap image) throws NotFoundException {
    if (readers != null) {
      for (Reader reader : readers) {
        try {
          return reader.decode(image, hints);
        } catch (ReaderException re) {
          // continue
        }
      }
    }
    throw NotFoundException.getNotFoundInstance();
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/MultiFormatWriter.java
================================================
/*
 * Copyright 2008 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import com.google.zxing.aztec.AztecWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.datamatrix.DataMatrixWriter;
import com.google.zxing.oned.CodaBarWriter;
import com.google.zxing.oned.Code128Writer;
import com.google.zxing.oned.Code39Writer;
import com.google.zxing.oned.Code93Writer;
import com.google.zxing.oned.EAN13Writer;
import com.google.zxing.oned.EAN8Writer;
import com.google.zxing.oned.ITFWriter;
import com.google.zxing.oned.UPCAWriter;
import com.google.zxing.oned.UPCEWriter;
import com.google.zxing.pdf417.PDF417Writer;
import com.google.zxing.qrcode.QRCodeWriter;

import java.util.Map;

/**
 * This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat
 * requested and encodes the barcode with the supplied contents.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class MultiFormatWriter implements Writer {

  @Override
  public BitMatrix encode(String contents,
                          BarcodeFormat format,
                          int width,
                          int height) throws WriterException {
    return encode(contents, format, width, height, null);
  }

  @Override
  public BitMatrix encode(String contents,
                          BarcodeFormat format,
                          int width, int height,
                          Map<EncodeHintType,?> hints) throws WriterException {

    Writer writer;
    switch (format) {
      case EAN_8:
        writer = new EAN8Writer();
        break;
      case UPC_E:
        writer = new UPCEWriter();
        break;
      case EAN_13:
        writer = new EAN13Writer();
        break;
      case UPC_A:
        writer = new UPCAWriter();
        break;
      case QR_CODE:
        writer = new QRCodeWriter();
        break;
      case CODE_39:
        writer = new Code39Writer();
        break;
      case CODE_93:
        writer = new Code93Writer();
        break;
      case CODE_128:
        writer = new Code128Writer();
        break;
      case ITF:
        writer = new ITFWriter();
        break;
      case PDF_417:
        writer = new PDF417Writer();
        break;
      case CODABAR:
        writer = new CodaBarWriter();
        break;
      case DATA_MATRIX:
        writer = new DataMatrixWriter();
        break;
      case AZTEC:
        writer = new AztecWriter();
        break;
      default:
        throw new IllegalArgumentException("No encoder available for format " + format);
    }
    return writer.encode(contents, format, width, height, hints);
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/NotFoundException.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Thrown when a barcode was not found in the image. It might have been
 * partially detected but could not be confirmed.
 *
 * @author Sean Owen
 */
public final class NotFoundException extends ReaderException {

  private static final NotFoundException INSTANCE = new NotFoundException();
  static {
    INSTANCE.setStackTrace(NO_TRACE); // since it's meaningless
  }

  private NotFoundException() {
    // do nothing
  }

  public static NotFoundException getNotFoundInstance() {
    return INSTANCE;
  }

}

================================================
FILE: scanner/src/main/java/com/google/zxing/PlanarYUVLuminanceSource.java
================================================
/*
 * Copyright 2009 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * This object extends LuminanceSource around an array of YUV data returned from the camera driver,
 * with the option to crop to a rectangle within the full data. This can be used to exclude
 * superfluous pixels around the perimeter and speed up decoding.
 *
 * It works for any pixel format where the Y channel is planar and appears first, including
 * YCbCr_420_SP and YCbCr_422_SP.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class PlanarYUVLuminanceSource extends LuminanceSource {

  private static final int THUMBNAIL_SCALE_FACTOR = 2;

  private final byte[] yuvData;
  private final int dataWidth;
  private final int dataHeight;
  private final int left;
  private final int top;

  public PlanarYUVLuminanceSource(byte[] yuvData,
                                  int dataWidth,
                                  int dataHeight,
                                  int left,
                                  int top,
                                  int width,
                                  int height,
                                  boolean reverseHorizontal) {
    super(width, height);

    if (left + width > dataWidth || top + height > dataHeight) {
      throw new IllegalArgumentException("Crop rectangle does not fit within image data.");
    }

    this.yuvData = yuvData;
    this.dataWidth = dataWidth;
    this.dataHeight = dataHeight;
    this.left = left;
    this.top = top;
    if (reverseHorizontal) {
      reverseHorizontal(width, height);
    }
  }

  @Override
  public byte[] getRow(int y, byte[] row) {
    if (y < 0 || y >= getHeight()) {
      throw new IllegalArgumentException("Requested row is outside the image: " + y);
    }
    int width = getWidth();
    if (row == null || row.length < width) {
      row = new byte[width];
    }
    int offset = (y + top) * dataWidth + left;
    System.arraycopy(yuvData, offset, row, 0, width);
    return row;
  }

  @Override
  public byte[] getMatrix() {
    int width = getWidth();
    int height = getHeight();

    // If the caller asks for the entire underlying image, save the copy and give them the
    // original data. The docs specifically warn that result.length must be ignored.
    if (width == dataWidth && height == dataHeight) {
      return yuvData;
    }

    int area = width * height;
    byte[] matrix = new byte[area];
    int inputOffset = top * dataWidth + left;

    // If the width matches the full width of the underlying data, perform a single copy.
    if (width == dataWidth) {
      System.arraycopy(yuvData, inputOffset, matrix, 0, area);
      return matrix;
    }

    // Otherwise copy one cropped row at a time.
    for (int y = 0; y < height; y++) {
      int outputOffset = y * width;
      System.arraycopy(yuvData, inputOffset, matrix, outputOffset, width);
      inputOffset += dataWidth;
    }
    return matrix;
  }

  @Override
  public boolean isCropSupported() {
    return true;
  }

  @Override
  public LuminanceSource crop(int left, int top, int width, int height) {
    return new PlanarYUVLuminanceSource(yuvData,
                                        dataWidth,
                                        dataHeight,
                                        this.left + left,
                                        this.top + top,
                                        width,
                                        height,
                                        false);
  }

  public int[] renderThumbnail() {
    int width = getWidth() / THUMBNAIL_SCALE_FACTOR;
    int height = getHeight() / THUMBNAIL_SCALE_FACTOR;
    int[] pixels = new int[width * height];
    byte[] yuv = yuvData;
    int inputOffset = top * dataWidth + left;

    for (int y = 0; y < height; y++) {
      int outputOffset = y * width;
      for (int x = 0; x < width; x++) {
        int grey = yuv[inputOffset + x * THUMBNAIL_SCALE_FACTOR] & 0xff;
        pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);
      }
      inputOffset += dataWidth * THUMBNAIL_SCALE_FACTOR;
    }
    return pixels;
  }

  /**
   * @return width of image from {@link #renderThumbnail()}
   */
  public int getThumbnailWidth() {
    return getWidth() / THUMBNAIL_SCALE_FACTOR;
  }

  /**
   * @return height of image from {@link #renderThumbnail()}
   */
  public int getThumbnailHeight() {
    return getHeight() / THUMBNAIL_SCALE_FACTOR;
  }

  private void reverseHorizontal(int width, int height) {
    byte[] yuvData = this.yuvData;
    for (int y = 0, rowStart = top * dataWidth + left; y < height; y++, rowStart += dataWidth) {
      int middle = rowStart + width / 2;
      for (int x1 = rowStart, x2 = rowStart + width - 1; x1 < middle; x1++, x2--) {
        byte temp = yuvData[x1];
        yuvData[x1] = yuvData[x2];
        yuvData[x2] = temp;
      }
    }
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/RGBLuminanceSource.java
================================================
/*
 * Copyright 2009 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * This class is used to help decode images from files which arrive as RGB data from
 * an ARGB pixel array. It does not support rotation.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 * @author Betaminos
 */
public final class RGBLuminanceSource extends LuminanceSource {

  private final byte[] luminances;
  private final int dataWidth;
  private final int dataHeight;
  private final int left;
  private final int top;

  public RGBLuminanceSource(int width, int height, int[] pixels) {
    super(width, height);

    dataWidth = width;
    dataHeight = height;
    left = 0;
    top = 0;

    // In order to measure pure decoding speed, we convert the entire image to a greyscale array
    // up front, which is the same as the Y channel of the YUVLuminanceSource in the real app.
    //
    // Total number of pixels suffices, can ignore shape
    int size = width * height;
    luminances = new byte[size];
    for (int offset = 0; offset < size; offset++) {
      int pixel = pixels[offset];
      int r = (pixel >> 16) & 0xff; // red
      int g2 = (pixel >> 7) & 0x1fe; // 2 * green
      int b = pixel & 0xff; // blue
      // Calculate green-favouring average cheaply
      luminances[offset] = (byte) ((r + g2 + b) / 4);
    }
  }

  private RGBLuminanceSource(byte[] pixels,
                             int dataWidth,
                             int dataHeight,
                             int left,
                             int top,
                             int width,
                             int height) {
    super(width, height);
    if (left + width > dataWidth || top + height > dataHeight) {
      throw new IllegalArgumentException("Crop rectangle does not fit within image data.");
    }
    this.luminances = pixels;
    this.dataWidth = dataWidth;
    this.dataHeight = dataHeight;
    this.left = left;
    this.top = top;
  }

  @Override
  public byte[] getRow(int y, byte[] row) {
    if (y < 0 || y >= getHeight()) {
      throw new IllegalArgumentException("Requested row is outside the image: " + y);
    }
    int width = getWidth();
    if (row == null || row.length < width) {
      row = new byte[width];
    }
    int offset = (y + top) * dataWidth + left;
    System.arraycopy(luminances, offset, row, 0, width);
    return row;
  }

  @Override
  public byte[] getMatrix() {
    int width = getWidth();
    int height = getHeight();

    // If the caller asks for the entire underlying image, save the copy and give them the
    // original data. The docs specifically warn that result.length must be ignored.
    if (width == dataWidth && height == dataHeight) {
      return luminances;
    }

    int area = width * height;
    byte[] matrix = new byte[area];
    int inputOffset = top * dataWidth + left;

    // If the width matches the full width of the underlying data, perform a single copy.
    if (width == dataWidth) {
      System.arraycopy(luminances, inputOffset, matrix, 0, area);
      return matrix;
    }

    // Otherwise copy one cropped row at a time.
    for (int y = 0; y < height; y++) {
      int outputOffset = y * width;
      System.arraycopy(luminances, inputOffset, matrix, outputOffset, width);
      inputOffset += dataWidth;
    }
    return matrix;
  }

  @Override
  public boolean isCropSupported() {
    return true;
  }

  @Override
  public LuminanceSource crop(int left, int top, int width, int height) {
    return new RGBLuminanceSource(luminances,
                                  dataWidth,
                                  dataHeight,
                                  this.left + left,
                                  this.top + top,
                                  width,
                                  height);
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/Reader.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import java.util.Map;

/**
 * Implementations of this interface can decode an image of a barcode in some format into
 * the String it encodes. For example, {@link com.google.zxing.qrcode.QRCodeReader} can
 * decode a QR code. The decoder may optionally receive hints from the caller which may help
 * it decode more quickly or accurately.
 *
 * See {@link MultiFormatReader}, which attempts to determine what barcode
 * format is present within the image as well, and then decodes it accordingly.
 *
 * @author Sean Owen
 * @author dswitkin@google.com (Daniel Switkin)
 */
public interface Reader {

  /**
   * Locates and decodes a barcode in some format within an image.
   *
   * @param image image of barcode to decode
   * @return String which the barcode encodes
   * @throws NotFoundException if no potential barcode is found
   * @throws ChecksumException if a potential barcode is found but does not pass its checksum
   * @throws FormatException if a potential barcode is found but format is invalid
   */
  Result decode(BinaryBitmap image) throws NotFoundException, ChecksumException, FormatException;

  /**
   * Locates and decodes a barcode in some format within an image. This method also accepts
   * hints, each possibly associated to some data, which may help the implementation decode.
   *
   * @param image image of barcode to decode
   * @param hints passed as a {@link Map} from {@link DecodeHintType}
   * to arbitrary data. The
   * meaning of the data depends upon the hint type. The implementation may or may not do
   * anything with these hints.
   * @return String which the barcode encodes
   * @throws NotFoundException if no potential barcode is found
   * @throws ChecksumException if a potential barcode is found but does not pass its checksum
   * @throws FormatException if a potential barcode is found but format is invalid
   */
  Result decode(BinaryBitmap image, Map<DecodeHintType, ?> hints)
      throws NotFoundException, ChecksumException, FormatException;

  /**
   * Resets any internal state the implementation has after a decode, to prepare it
   * for reuse.
   */
  void reset();

}


================================================
FILE: scanner/src/main/java/com/google/zxing/ReaderException.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * The general exception class throw when something goes wrong during decoding of a barcode.
 * This includes, but is not limited to, failing checksums / error correction algorithms, being
 * unable to locate finder timing patterns, and so on.
 *
 * @author Sean Owen
 */
public abstract class ReaderException extends Exception {

  // disable stack traces when not running inside test units
  protected static final boolean isStackTrace =
      System.getProperty("surefire.test.class.path") != null;
  protected static final StackTraceElement[] NO_TRACE = new StackTraceElement[0];

  ReaderException() {
    // do nothing
  }

  ReaderException(Throwable cause) {
    super(cause);
  }

  // Prevent stack traces from being taken
  @Override
  public final synchronized Throwable fillInStackTrace() {
    return null;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/Result.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import java.util.EnumMap;
import java.util.Map;

/**
 * <p>Encapsulates the result of decoding a barcode within an image.</p>
 *
 * @author Sean Owen
 */
public final class Result {

  private final String text;
  private final byte[] rawBytes;
  private final int numBits;
  private ResultPoint[] resultPoints;
  private final BarcodeFormat format;
  private Map<ResultMetadataType,Object> resultMetadata;
  private final long timestamp;

  public Result(String text,
                byte[] rawBytes,
                ResultPoint[] resultPoints,
                BarcodeFormat format) {
    this(text, rawBytes, resultPoints, format, System.currentTimeMillis());
  }

  public Result(String text,
                byte[] rawBytes,
                ResultPoint[] resultPoints,
                BarcodeFormat format,
                long timestamp) {
    this(text, rawBytes, rawBytes == null ? 0 : 8 * rawBytes.length,
         resultPoints, format, timestamp);
  }

  public Result(String text,
                byte[] rawBytes,
                int numBits,
                ResultPoint[] resultPoints,
                BarcodeFormat format,
                long timestamp) {
    this.text = text;
    this.rawBytes = rawBytes;
    this.numBits = numBits;
    this.resultPoints = resultPoints;
    this.format = format;
    this.resultMetadata = null;
    this.timestamp = timestamp;
  }

  /**
   * @return raw text encoded by the barcode
   */
  public String getText() {
    return text;
  }

  /**
   * @return raw bytes encoded by the barcode, if applicable, otherwise {@code null}
   */
  public byte[] getRawBytes() {
    return rawBytes;
  }

  /**
   * @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length
   * @since 3.3.0
   */
  public int getNumBits() {
    return numBits;
  }

  /**
   * @return points related to the barcode in the image. These are typically points
   *         identifying finder patterns or the corners of the barcode. The exact meaning is
   *         specific to the type of barcode that was decoded.
   */
  public ResultPoint[] getResultPoints() {
    return resultPoints;
  }

  /**
   * @return {@link BarcodeFormat} representing the format of the barcode that was decoded
   */
  public BarcodeFormat getBarcodeFormat() {
    return format;
  }

  /**
   * @return {@link Map} mapping {@link ResultMetadataType} keys to values. May be
   *   {@code null}. This contains optional metadata about what was detected about the barcode,
   *   like orientation.
   */
  public Map<ResultMetadataType,Object> getResultMetadata() {
    return resultMetadata;
  }

  public void putMetadata(ResultMetadataType type, Object value) {
    if (resultMetadata == null) {
      resultMetadata = new EnumMap<>(ResultMetadataType.class);
    }
    resultMetadata.put(type, value);
  }

  public void putAllMetadata(Map<ResultMetadataType,Object> metadata) {
    if (metadata != null) {
      if (resultMetadata == null) {
        resultMetadata = metadata;
      } else {
        resultMetadata.putAll(metadata);
      }
    }
  }

  public void addResultPoints(ResultPoint[] newPoints) {
    ResultPoint[] oldPoints = resultPoints;
    if (oldPoints == null) {
      resultPoints = newPoints;
    } else if (newPoints != null && newPoints.length > 0) {
      ResultPoint[] allPoints = new ResultPoint[oldPoints.length + newPoints.length];
      System.arraycopy(oldPoints, 0, allPoints, 0, oldPoints.length);
      System.arraycopy(newPoints, 0, allPoints, oldPoints.length, newPoints.length);
      resultPoints = allPoints;
    }
  }

  public long getTimestamp() {
    return timestamp;
  }

  @Override
  public String toString() {
    return text;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/ResultMetadataType.java
================================================
/*
 * Copyright 2008 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Represents some type of metadata about the result of the decoding that the decoder
 * wishes to communicate back to the caller.
 *
 * @author Sean Owen
 */
public enum ResultMetadataType {

  /**
   * Unspecified, application-specific metadata. Maps to an unspecified {@link Object}.
   */
  OTHER,

  /**
   * Denotes the likely approximate orientation of the barcode in the image. This value
   * is given as degrees rotated clockwise from the normal, upright orientation.
   * For example a 1D barcode which was found by reading top-to-bottom would be
   * said to have orientation "90". This key maps to an {@link Integer} whose
   * value is in the range [0,360).
   */
  ORIENTATION,

  /**
   * <p>2D barcode formats typically encode text, but allow for a sort of 'byte mode'
   * which is sometimes used to encode binary data. While {@link Result} makes available
   * the complete raw bytes in the barcode for these formats, it does not offer the bytes
   * from the byte segments alone.</p>
   *
   * <p>This maps to a {@link java.util.List} of byte arrays corresponding to the
   * raw bytes in the byte segments in the barcode, in order.</p>
   */
  BYTE_SEGMENTS,

  /**
   * Error correction level used, if applicable. The value type depends on the
   * format, but is typically a String.
   */
  ERROR_CORRECTION_LEVEL,

  /**
   * For some periodicals, indicates the issue number as an {@link Integer}.
   */
  ISSUE_NUMBER,

  /**
   * For some products, indicates the suggested retail price in the barcode as a
   * formatted {@link String}.
   */
  SUGGESTED_PRICE,

  /**
   * For some products, the possible country of manufacture as a {@link String} denoting the
   * ISO country code. Some map to multiple possible countries, like "US/CA".
   */
  POSSIBLE_COUNTRY,

  /**
   * For some products, the extension text
   */
  UPC_EAN_EXTENSION,

  /**
   * PDF417-specific metadata
   */
  PDF417_EXTRA_METADATA,

  /**
   * If the code format supports structured append and the current scanned code is part of one then the
   * sequence number is given with it.
   */
  STRUCTURED_APPEND_SEQUENCE,

  /**
   * If the code format supports structured append and the current scanned code is part of one then the
   * parity is given with it.
   */
  STRUCTURED_APPEND_PARITY,

}


================================================
FILE: scanner/src/main/java/com/google/zxing/ResultPoint.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import com.google.zxing.common.detector.MathUtils;

/**
 * <p>Encapsulates a point of interest in an image containing a barcode. Typically, this
 * would be the location of a finder pattern or the corner of the barcode, for example.</p>
 *
 * @author Sean Owen
 */
public class ResultPoint {

  private final float x;
  private final float y;

  public ResultPoint(float x, float y) {
    this.x = x;
    this.y = y;
  }

  public final float getX() {
    return x;
  }

  public final float getY() {
    return y;
  }

  @Override
  public final boolean equals(Object other) {
    if (other instanceof ResultPoint) {
      ResultPoint otherPoint = (ResultPoint) other;
      return x == otherPoint.x && y == otherPoint.y;
    }
    return false;
  }

  @Override
  public final int hashCode() {
    return 31 * Float.floatToIntBits(x) + Float.floatToIntBits(y);
  }

  @Override
  public final String toString() {
    return "(" + x + ',' + y + ')';
  }

  /**
   * Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
   * and BC is less than AC, and the angle between BC and BA is less than 180 degrees.
   *
   * @param patterns array of three {@code ResultPoint} to order
   */
  public static void orderBestPatterns(ResultPoint[] patterns) {

    // Find distances between pattern centers
    float zeroOneDistance = distance(patterns[0], patterns[1]);
    float oneTwoDistance = distance(patterns[1], patterns[2]);
    float zeroTwoDistance = distance(patterns[0], patterns[2]);

    ResultPoint pointA;
    ResultPoint pointB;
    ResultPoint pointC;
    // Assume one closest to other two is B; A and C will just be guesses at first
    if (oneTwoDistance >= zeroOneDistance && oneTwoDistance >= zeroTwoDistance) {
      pointB = patterns[0];
      pointA = patterns[1];
      pointC = patterns[2];
    } else if (zeroTwoDistance >= oneTwoDistance && zeroTwoDistance >= zeroOneDistance) {
      pointB = patterns[1];
      pointA = patterns[0];
      pointC = patterns[2];
    } else {
      pointB = patterns[2];
      pointA = patterns[0];
      pointC = patterns[1];
    }

    // Use cross product to figure out whether A and C are correct or flipped.
    // This asks whether BC x BA has a positive z component, which is the arrangement
    // we want for A, B, C. If it's negative, then we've got it flipped around and
    // should swap A and C.
    if (crossProductZ(pointA, pointB, pointC) < 0.0f) {
      ResultPoint temp = pointA;
      pointA = pointC;
      pointC = temp;
    }

    patterns[0] = pointA;
    patterns[1] = pointB;
    patterns[2] = pointC;
  }

  /**
   * @param pattern1 first pattern
   * @param pattern2 second pattern
   * @return distance between two points
   */
  public static float distance(ResultPoint pattern1, ResultPoint pattern2) {
    return MathUtils.distance(pattern1.x, pattern1.y, pattern2.x, pattern2.y);
  }

  /**
   * Returns the z component of the cross product between vectors BC and BA.
   */
  private static float crossProductZ(ResultPoint pointA,
                                     ResultPoint pointB,
                                     ResultPoint pointC) {
    float bX = pointB.x;
    float bY = pointB.y;
    return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/ResultPointCallback.java
================================================
/*
 * Copyright 2009 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * Callback which is invoked when a possible result point (significant
 * point in the barcode image such as a corner) is found.
 *
 * @see DecodeHintType#NEED_RESULT_POINT_CALLBACK
 */
public interface ResultPointCallback {

  void foundPossibleResultPoint(ResultPoint point);

}


================================================
FILE: scanner/src/main/java/com/google/zxing/Writer.java
================================================
/*
 * Copyright 2008 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

import com.google.zxing.common.BitMatrix;

import java.util.Map;

/**
 * The base class for all objects which encode/generate a barcode image.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public interface Writer {

  /**
   * Encode a barcode using the default settings.
   *
   * @param contents The contents to encode in the barcode
   * @param format The barcode format to generate
   * @param width The preferred width in pixels
   * @param height The preferred height in pixels
   * @return {@link BitMatrix} representing encoded barcode image
   * @throws WriterException if contents cannot be encoded legally in a format
   */
  BitMatrix encode(String contents, BarcodeFormat format, int width, int height)
      throws WriterException;

  /**
   * @param contents The contents to encode in the barcode
   * @param format The barcode format to generate
   * @param width The preferred width in pixels
   * @param height The preferred height in pixels
   * @param hints Additional parameters to supply to the encoder
   * @return {@link BitMatrix} representing encoded barcode image
   * @throws WriterException if contents cannot be encoded legally in a format
   */
  BitMatrix encode(String contents,
                   BarcodeFormat format,
                   int width,
                   int height,
                   Map<EncodeHintType, ?> hints)
      throws WriterException;

}


================================================
FILE: scanner/src/main/java/com/google/zxing/WriterException.java
================================================
/*
 * Copyright 2008 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing;

/**
 * A base class which covers the range of exceptions which may occur when encoding a barcode using
 * the Writer framework.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class WriterException extends Exception {

  public WriterException() {
  }

  public WriterException(String message) {
    super(message);
  }
 
  public WriterException(Throwable cause) {
    super(cause);
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/AztecDetectorResult.java
================================================
/*
 * Copyright 2010 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec;

import com.google.zxing.ResultPoint;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.DetectorResult;

/**
 * <p>Extends {@link DetectorResult} with more information specific to the Aztec format,
 * like the number of layers and whether it's compact.</p>
 *
 * @author Sean Owen
 */
public final class AztecDetectorResult extends DetectorResult {

  private final boolean compact;
  private final int nbDatablocks;
  private final int nbLayers;

  public AztecDetectorResult(BitMatrix bits,
                             ResultPoint[] points,
                             boolean compact,
                             int nbDatablocks,
                             int nbLayers) {
    super(bits, points);
    this.compact = compact;
    this.nbDatablocks = nbDatablocks;
    this.nbLayers = nbLayers;
  }

  public int getNbLayers() {
    return nbLayers;
  }

  public int getNbDatablocks() {
    return nbDatablocks;
  }

  public boolean isCompact() {
    return compact;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/AztecReader.java
================================================
/*
 * Copyright 2010 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec;

import com.google.zxing.BarcodeFormat;
import com.google.zxing.BinaryBitmap;
import com.google.zxing.DecodeHintType;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.Reader;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
import com.google.zxing.ResultPoint;
import com.google.zxing.ResultPointCallback;
import com.google.zxing.aztec.decoder.Decoder;
import com.google.zxing.aztec.detector.Detector;
import com.google.zxing.common.DecoderResult;

import java.util.List;
import java.util.Map;

/**
 * This implementation can detect and decode Aztec codes in an image.
 *
 * @author David Olivier
 */
public final class AztecReader implements Reader {

  /**
   * Locates and decodes a Data Matrix code in an image.
   *
   * @return a String representing the content encoded by the Data Matrix code
   * @throws NotFoundException if a Data Matrix code cannot be found
   * @throws FormatException if a Data Matrix code cannot be decoded
   */
  @Override
  public Result decode(BinaryBitmap image) throws NotFoundException, FormatException {
    return decode(image, null);
  }

  @Override
  public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints)
      throws NotFoundException, FormatException {

    NotFoundException notFoundException = null;
    FormatException formatException = null;
    Detector detector = new Detector(image.getBlackMatrix());
    ResultPoint[] points = null;
    DecoderResult decoderResult = null;
    try {
      AztecDetectorResult detectorResult = detector.detect(false);
      points = detectorResult.getPoints();
      decoderResult = new Decoder().decode(detectorResult);
    } catch (NotFoundException e) {
      notFoundException = e;
    } catch (FormatException e) {
      formatException = e;
    }
    if (decoderResult == null) {
      try {
        AztecDetectorResult detectorResult = detector.detect(true);
        points = detectorResult.getPoints();
        decoderResult = new Decoder().decode(detectorResult);
      } catch (NotFoundException | FormatException e) {
        if (notFoundException != null) {
          throw notFoundException;
        }
        if (formatException != null) {
          throw formatException;
        }
        throw e;
      }
    }

    if (hints != null) {
      ResultPointCallback rpcb = (ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
      if (rpcb != null) {
        for (ResultPoint point : points) {
          rpcb.foundPossibleResultPoint(point);
        }
      }
    }

    Result result = new Result(decoderResult.getText(),
                               decoderResult.getRawBytes(),
                               decoderResult.getNumBits(),
                               points,
                               BarcodeFormat.AZTEC,
                               System.currentTimeMillis());

    List<byte[]> byteSegments = decoderResult.getByteSegments();
    if (byteSegments != null) {
      result.putMetadata(ResultMetadataType.BYTE_SEGMENTS, byteSegments);
    }
    String ecLevel = decoderResult.getECLevel();
    if (ecLevel != null) {
      result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel);
    }

    return result;
  }

  @Override
  public void reset() {
    // do nothing
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/AztecWriter.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec;

import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.Writer;
import com.google.zxing.aztec.encoder.AztecCode;
import com.google.zxing.aztec.encoder.Encoder;
import com.google.zxing.common.BitMatrix;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Map;

/**
 * Renders an Aztec code as a {@link BitMatrix}.
 */
public final class AztecWriter implements Writer {

  @Override
  public BitMatrix encode(String contents, BarcodeFormat format, int width, int height) {
    return encode(contents, format, width, height, null);
  }

  @Override
  public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) {
    Charset charset = StandardCharsets.ISO_8859_1;
    int eccPercent = Encoder.DEFAULT_EC_PERCENT;
    int layers = Encoder.DEFAULT_AZTEC_LAYERS;
    if (hints != null) {
      if (hints.containsKey(EncodeHintType.CHARACTER_SET)) {
        charset = Charset.forName(hints.get(EncodeHintType.CHARACTER_SET).toString());
      }
      if (hints.containsKey(EncodeHintType.ERROR_CORRECTION)) {
        eccPercent = Integer.parseInt(hints.get(EncodeHintType.ERROR_CORRECTION).toString());
      }
      if (hints.containsKey(EncodeHintType.AZTEC_LAYERS)) {
        layers = Integer.parseInt(hints.get(EncodeHintType.AZTEC_LAYERS).toString());
      }
    }
    return encode(contents, format, width, height, charset, eccPercent, layers);
  }

  private static BitMatrix encode(String contents, BarcodeFormat format,
                                  int width, int height,
                                  Charset charset, int eccPercent, int layers) {
    if (format != BarcodeFormat.AZTEC) {
      throw new IllegalArgumentException("Can only encode AZTEC, but got " + format);
    }
    AztecCode aztec = Encoder.encode(contents.getBytes(charset), eccPercent, layers);
    return renderResult(aztec, width, height);
  }

  private static BitMatrix renderResult(AztecCode code, int width, int height) {
    BitMatrix input = code.getMatrix();
    if (input == null) {
      throw new IllegalStateException();
    }
    int inputWidth = input.getWidth();
    int inputHeight = input.getHeight();
    int outputWidth = Math.max(width, inputWidth);
    int outputHeight = Math.max(height, inputHeight);

    int multiple = Math.min(outputWidth / inputWidth, outputHeight / inputHeight);
    int leftPadding = (outputWidth - (inputWidth * multiple)) / 2;
    int topPadding = (outputHeight - (inputHeight * multiple)) / 2;

    BitMatrix output = new BitMatrix(outputWidth, outputHeight);

    for (int inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) {
      // Write the contents of this row of the barcode
      for (int inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) {
        if (input.get(inputX, inputY)) {
          output.setRegion(outputX, outputY, multiple, multiple);
        }
      }
    }
    return output;
  }
}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/decoder/Decoder.java
================================================
/*
 * Copyright 2010 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.decoder;

import com.google.zxing.FormatException;
import com.google.zxing.aztec.AztecDetectorResult;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.DecoderResult;
import com.google.zxing.common.reedsolomon.GenericGF;
import com.google.zxing.common.reedsolomon.ReedSolomonDecoder;
import com.google.zxing.common.reedsolomon.ReedSolomonException;

import java.util.Arrays;

/**
 * <p>The main class which implements Aztec Code decoding -- as opposed to locating and extracting
 * the Aztec Code from an image.</p>
 *
 * @author David Olivier
 */
public final class Decoder {

  private enum Table {
    UPPER,
    LOWER,
    MIXED,
    DIGIT,
    PUNCT,
    BINARY
  }

  private static final String[] UPPER_TABLE = {
      "CTRL_PS", " ", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
      "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "CTRL_LL", "CTRL_ML", "CTRL_DL", "CTRL_BS"
  };

  private static final String[] LOWER_TABLE = {
      "CTRL_PS", " ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
      "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "CTRL_US", "CTRL_ML", "CTRL_DL", "CTRL_BS"
  };

  private static final String[] MIXED_TABLE = {
      "CTRL_PS", " ", "\1", "\2", "\3", "\4", "\5", "\6", "\7", "\b", "\t", "\n",
      "\13", "\f", "\r", "\33", "\34", "\35", "\36", "\37", "@", "\\", "^", "_",
      "`", "|", "~", "\177", "CTRL_LL", "CTRL_UL", "CTRL_PL", "CTRL_BS"
  };

  private static final String[] PUNCT_TABLE = {
      "", "\r", "\r\n", ". ", ", ", ": ", "!", "\"", "#", "$", "%", "&", "'", "(", ")",
      "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "[", "]", "{", "}", "CTRL_UL"
  };

  private static final String[] DIGIT_TABLE = {
      "CTRL_PS", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", ".", "CTRL_UL", "CTRL_US"
  };

  private AztecDetectorResult ddata;

  public DecoderResult decode(AztecDetectorResult detectorResult) throws FormatException {
    ddata = detectorResult;
    BitMatrix matrix = detectorResult.getBits();
    boolean[] rawbits = extractBits(matrix);
    boolean[] correctedBits = correctBits(rawbits);
    byte[] rawBytes = convertBoolArrayToByteArray(correctedBits);
    String result = getEncodedData(correctedBits);
    DecoderResult decoderResult = new DecoderResult(rawBytes, result, null, null);
    decoderResult.setNumBits(correctedBits.length);
    return decoderResult;
  }

  // This method is used for testing the high-level encoder
  public static String highLevelDecode(boolean[] correctedBits) {
    return getEncodedData(correctedBits);
  }

  /**
   * Gets the string encoded in the aztec code bits
   *
   * @return the decoded string
   */
  private static String getEncodedData(boolean[] correctedBits) {
    int endIndex = correctedBits.length;
    Table latchTable = Table.UPPER; // table most recently latched to
    Table shiftTable = Table.UPPER; // table to use for the next read
    StringBuilder result = new StringBuilder(20);
    int index = 0;
    while (index < endIndex) {
      if (shiftTable == Table.BINARY) {
        if (endIndex - index < 5) {
          break;
        }
        int length = readCode(correctedBits, index, 5);
        index += 5;
        if (length == 0) {
          if (endIndex - index < 11) {
            break;
          }
          length = readCode(correctedBits, index, 11) + 31;
          index += 11;
        }
        for (int charCount = 0; charCount < length; charCount++) {
          if (endIndex - index < 8) {
            index = endIndex;  // Force outer loop to exit
            break;
          }
          int code = readCode(correctedBits, index, 8);
          result.append((char) code);
          index += 8;
        }
        // Go back to whatever mode we had been in
        shiftTable = latchTable;
      } else {
        int size = shiftTable == Table.DIGIT ? 4 : 5;
        if (endIndex - index < size) {
          break;
        }
        int code = readCode(correctedBits, index, size);
        index += size;
        String str = getCharacter(shiftTable, code);
        if (str.startsWith("CTRL_")) {
          // Table changes
          // ISO/IEC 24778:2008 prescribes ending a shift sequence in the mode from which it was invoked.
          // That's including when that mode is a shift.
          // Our test case dlusbs.png for issue #642 exercises that.
          latchTable = shiftTable;  // Latch the current mode, so as to return to Upper after U/S B/S
          shiftTable = getTable(str.charAt(5));
          if (str.charAt(6) == 'L') {
            latchTable = shiftTable;
          }
        } else {
          result.append(str);
          // Go back to whatever mode we had been in
          shiftTable = latchTable;
        }
      }
    }
    return result.toString();
  }

  /**
   * gets the table corresponding to the char passed
   */
  private static Table getTable(char t) {
    switch (t) {
      case 'L':
        return Table.LOWER;
      case 'P':
        return Table.PUNCT;
      case 'M':
        return Table.MIXED;
      case 'D':
        return Table.DIGIT;
      case 'B':
        return Table.BINARY;
      case 'U':
      default:
        return Table.UPPER;
    }
  }

  /**
   * Gets the character (or string) corresponding to the passed code in the given table
   *
   * @param table the table used
   * @param code the code of the character
   */
  private static String getCharacter(Table table, int code) {
    switch (table) {
      case UPPER:
        return UPPER_TABLE[code];
      case LOWER:
        return LOWER_TABLE[code];
      case MIXED:
        return MIXED_TABLE[code];
      case PUNCT:
        return PUNCT_TABLE[code];
      case DIGIT:
        return DIGIT_TABLE[code];
      default:
        // Should not reach here.
        throw new IllegalStateException("Bad table");
    }
  }

  /**
   * <p>Performs RS error correction on an array of bits.</p>
   *
   * @return the corrected array
   * @throws FormatException if the input contains too many errors
   */
  private boolean[] correctBits(boolean[] rawbits) throws FormatException {
    GenericGF gf;
    int codewordSize;

    if (ddata.getNbLayers() <= 2) {
      codewordSize = 6;
      gf = GenericGF.AZTEC_DATA_6;
    } else if (ddata.getNbLayers() <= 8) {
      codewordSize = 8;
      gf = GenericGF.AZTEC_DATA_8;
    } else if (ddata.getNbLayers() <= 22) {
      codewordSize = 10;
      gf = GenericGF.AZTEC_DATA_10;
    } else {
      codewordSize = 12;
      gf = GenericGF.AZTEC_DATA_12;
    }

    int numDataCodewords = ddata.getNbDatablocks();
    int numCodewords = rawbits.length / codewordSize;
    if (numCodewords < numDataCodewords) {
      throw FormatException.getFormatInstance();
    }
    int offset = rawbits.length % codewordSize;

    int[] dataWords = new int[numCodewords];
    for (int i = 0; i < numCodewords; i++, offset += codewordSize) {
      dataWords[i] = readCode(rawbits, offset, codewordSize);
    }

    try {
      ReedSolomonDecoder rsDecoder = new ReedSolomonDecoder(gf);
      rsDecoder.decode(dataWords, numCodewords - numDataCodewords);
    } catch (ReedSolomonException ex) {
      throw FormatException.getFormatInstance(ex);
    }

    // Now perform the unstuffing operation.
    // First, count how many bits are going to be thrown out as stuffing
    int mask = (1 << codewordSize) - 1;
    int stuffedBits = 0;
    for (int i = 0; i < numDataCodewords; i++) {
      int dataWord = dataWords[i];
      if (dataWord == 0 || dataWord == mask) {
        throw FormatException.getFormatInstance();
      } else if (dataWord == 1 || dataWord == mask - 1) {
        stuffedBits++;
      }
    }
    // Now, actually unpack the bits and remove the stuffing
    boolean[] correctedBits = new boolean[numDataCodewords * codewordSize - stuffedBits];
    int index = 0;
    for (int i = 0; i < numDataCodewords; i++) {
      int dataWord = dataWords[i];
      if (dataWord == 1 || dataWord == mask - 1) {
        // next codewordSize-1 bits are all zeros or all ones
        Arrays.fill(correctedBits, index, index + codewordSize - 1, dataWord > 1);
        index += codewordSize - 1;
      } else {
        for (int bit = codewordSize - 1; bit >= 0; --bit) {
          correctedBits[index++] = (dataWord & (1 << bit)) != 0;
        }
      }
    }
    return correctedBits;
  }

  /**
   * Gets the array of bits from an Aztec Code matrix
   *
   * @return the array of bits
   */
  private boolean[] extractBits(BitMatrix matrix) {
    boolean compact = ddata.isCompact();
    int layers = ddata.getNbLayers();
    int baseMatrixSize = (compact ? 11 : 14) + layers * 4; // not including alignment lines
    int[] alignmentMap = new int[baseMatrixSize];
    boolean[] rawbits = new boolean[totalBitsInLayer(layers, compact)];

    if (compact) {
      for (int i = 0; i < alignmentMap.length; i++) {
        alignmentMap[i] = i;
      }
    } else {
      int matrixSize = baseMatrixSize + 1 + 2 * ((baseMatrixSize / 2 - 1) / 15);
      int origCenter = baseMatrixSize / 2;
      int center = matrixSize / 2;
      for (int i = 0; i < origCenter; i++) {
        int newOffset = i + i / 15;
        alignmentMap[origCenter - i - 1] = center - newOffset - 1;
        alignmentMap[origCenter + i] = center + newOffset + 1;
      }
    }
    for (int i = 0, rowOffset = 0; i < layers; i++) {
      int rowSize = (layers - i) * 4 + (compact ? 9 : 12);
      // The top-left most point of this layer is <low, low> (not including alignment lines)
      int low = i * 2;
      // The bottom-right most point of this layer is <high, high> (not including alignment lines)
      int high = baseMatrixSize - 1 - low;
      // We pull bits from the two 2 x rowSize columns and two rowSize x 2 rows
      for (int j = 0; j < rowSize; j++) {
        int columnOffset = j * 2;
        for (int k = 0; k < 2; k++) {
          // left column
          rawbits[rowOffset + columnOffset + k] =
              matrix.get(alignmentMap[low + k], alignmentMap[low + j]);
          // bottom row
          rawbits[rowOffset + 2 * rowSize + columnOffset + k] =
              matrix.get(alignmentMap[low + j], alignmentMap[high - k]);
          // right column
          rawbits[rowOffset + 4 * rowSize + columnOffset + k] =
              matrix.get(alignmentMap[high - k], alignmentMap[high - j]);
          // top row
          rawbits[rowOffset + 6 * rowSize + columnOffset + k] =
              matrix.get(alignmentMap[high - j], alignmentMap[low + k]);
        }
      }
      rowOffset += rowSize * 8;
    }
    return rawbits;
  }

  /**
   * Reads a code of given length and at given index in an array of bits
   */
  private static int readCode(boolean[] rawbits, int startIndex, int length) {
    int res = 0;
    for (int i = startIndex; i < startIndex + length; i++) {
      res <<= 1;
      if (rawbits[i]) {
        res |= 0x01;
      }
    }
    return res;
  }

  /**
   * Reads a code of length 8 in an array of bits, padding with zeros
   */
  private static byte readByte(boolean[] rawbits, int startIndex) {
    int n = rawbits.length - startIndex;
    if (n >= 8) {
      return (byte) readCode(rawbits, startIndex, 8);
    }
    return (byte) (readCode(rawbits, startIndex, n) << (8 - n));
  }

  /**
   * Packs a bit array into bytes, most significant bit first
   */
  static byte[] convertBoolArrayToByteArray(boolean[] boolArr) {
    byte[] byteArr = new byte[(boolArr.length + 7) / 8];
    for (int i = 0; i < byteArr.length; i++) {
      byteArr[i] = readByte(boolArr, 8 * i);
    }
    return byteArr;
  }

  private static int totalBitsInLayer(int layers, boolean compact) {
    return ((compact ? 88 : 112) + 16 * layers) * layers;
  }
}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/detector/Detector.java
================================================
/*
 * Copyright 2010 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.detector;

import com.google.zxing.NotFoundException;
import com.google.zxing.ResultPoint;
import com.google.zxing.aztec.AztecDetectorResult;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.GridSampler;
import com.google.zxing.common.detector.MathUtils;
import com.google.zxing.common.detector.WhiteRectangleDetector;
import com.google.zxing.common.reedsolomon.GenericGF;
import com.google.zxing.common.reedsolomon.ReedSolomonDecoder;
import com.google.zxing.common.reedsolomon.ReedSolomonException;

/**
 * Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code
 * is rotated or skewed, or partially obscured.
 *
 * @author David Olivier
 * @author Frank Yellin
 */
public final class Detector {

  private static final int[] EXPECTED_CORNER_BITS = {
      0xee0,  // 07340  XXX .XX X.. ...
      0x1dc,  // 00734  ... XXX .XX X..
      0x83b,  // 04073  X.. ... XXX .XX
      0x707,  // 03407 .XX X.. ... XXX
  };

  private final BitMatrix image;

  private boolean compact;
  private int nbLayers;
  private int nbDataBlocks;
  private int nbCenterLayers;
  private int shift;

  public Detector(BitMatrix image) {
    this.image = image;
  }

  public AztecDetectorResult detect() throws NotFoundException {
    return detect(false);
  }

  /**
   * Detects an Aztec Code in an image.
   *
   * @param isMirror if true, image is a mirror-image of original
   * @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
   * @throws NotFoundException if no Aztec Code can be found
   */
   public AztecDetectorResult detect(boolean isMirror) throws NotFoundException {

    // 1. Get the center of the aztec matrix
    Point pCenter = getMatrixCenter();

    // 2. Get the center points of the four diagonal points just outside the bull's eye
    //  [topRight, bottomRight, bottomLeft, topLeft]
    ResultPoint[] bullsEyeCorners = getBullsEyeCorners(pCenter);

    if (isMirror) {
      ResultPoint temp = bullsEyeCorners[0];
      bullsEyeCorners[0] = bullsEyeCorners[2];
      bullsEyeCorners[2] = temp;
    }

    // 3. Get the size of the matrix and other parameters from the bull's eye
    extractParameters(bullsEyeCorners);

    // 4. Sample the grid
    BitMatrix bits = sampleGrid(image,
                                bullsEyeCorners[shift % 4],
                                bullsEyeCorners[(shift + 1) % 4],
                                bullsEyeCorners[(shift + 2) % 4],
                                bullsEyeCorners[(shift + 3) % 4]);

    // 5. Get the corners of the matrix.
    ResultPoint[] corners = getMatrixCornerPoints(bullsEyeCorners);

    return new AztecDetectorResult(bits, corners, compact, nbDataBlocks, nbLayers);
  }

  /**
   * Extracts the number of data layers and data blocks from the layer around the bull's eye.
   *
   * @param bullsEyeCorners the array of bull's eye corners
   * @throws NotFoundException in case of too many errors or invalid parameters
   */
  private void extractParameters(ResultPoint[] bullsEyeCorners) throws NotFoundException {
    if (!isValid(bullsEyeCorners[0]) || !isValid(bullsEyeCorners[1]) ||
        !isValid(bullsEyeCorners[2]) || !isValid(bullsEyeCorners[3])) {
      throw NotFoundException.getNotFoundInstance();
    }
    int length = 2 * nbCenterLayers;
    // Get the bits around the bull's eye
    int[] sides = {
        sampleLine(bullsEyeCorners[0], bullsEyeCorners[1], length), // Right side
        sampleLine(bullsEyeCorners[1], bullsEyeCorners[2], length), // Bottom
        sampleLine(bullsEyeCorners[2], bullsEyeCorners[3], length), // Left side
        sampleLine(bullsEyeCorners[3], bullsEyeCorners[0], length)  // Top
    };

    // bullsEyeCorners[shift] is the corner of the bulls'eye that has three
    // orientation marks.
    // sides[shift] is the row/column that goes from the corner with three
    // orientation marks to the corner with two.
    shift = getRotation(sides, length);

    // Flatten the parameter bits into a single 28- or 40-bit long
    long parameterData = 0;
    for (int i = 0; i < 4; i++) {
      int side = sides[(shift + i) % 4];
      if (compact) {
        // Each side of the form ..XXXXXXX. where Xs are parameter data
        parameterData <<= 7;
        parameterData += (side >> 1) & 0x7F;
      } else {
        // Each side of the form ..XXXXX.XXXXX. where Xs are parameter data
        parameterData <<= 10;
        parameterData += ((side >> 2) & (0x1f << 5)) + ((side >> 1) & 0x1F);
      }
    }

    // Corrects parameter data using RS.  Returns just the data portion
    // without the error correction.
    int correctedData = getCorrectedParameterData(parameterData, compact);

    if (compact) {
      // 8 bits:  2 bits layers and 6 bits data blocks
      nbLayers = (correctedData >> 6) + 1;
      nbDataBlocks = (correctedData & 0x3F) + 1;
    } else {
      // 16 bits:  5 bits layers and 11 bits data blocks
      nbLayers = (correctedData >> 11) + 1;
      nbDataBlocks = (correctedData & 0x7FF) + 1;
    }
  }

  private static int getRotation(int[] sides, int length) throws NotFoundException {
    // In a normal pattern, we expect to See
    //   **    .*             D       A
    //   *      *
    //
    //   .      *
    //   ..    ..             C       B
    //
    // Grab the 3 bits from each of the sides the form the locator pattern and concatenate
    // into a 12-bit integer.  Start with the bit at A
    int cornerBits = 0;
    for (int side : sides) {
      // XX......X where X's are orientation marks
      int t = ((side >> (length - 2)) << 1) + (side & 1);
      cornerBits = (cornerBits << 3) + t;
    }
    // Mov the bottom bit to the top, so that the three bits of the locator pattern at A are
    // together.  cornerBits is now:
    //  3 orientation bits at A || 3 orientation bits at B || ... || 3 orientation bits at D
    cornerBits = ((cornerBits & 1) << 11) + (cornerBits >> 1);
    // The result shift indicates which element of BullsEyeCorners[] goes into the top-left
    // corner. Since the four rotation values have a Hamming distance of 8, we
    // can easily tolerate two errors.
    for (int shift = 0; shift < 4; shift++) {
      if (Integer.bitCount(cornerBits ^ EXPECTED_CORNER_BITS[shift]) <= 2) {
        return shift;
      }
    }
    throw NotFoundException.getNotFoundInstance();
  }

  /**
   * Corrects the parameter bits using Reed-Solomon algorithm.
   *
   * @param parameterData parameter bits
   * @param compact true if this is a compact Aztec code
   * @throws NotFoundException if the array contains too many errors
   */
  private static int getCorrectedParameterData(long parameterData, boolean compact) throws NotFoundException {
    int numCodewords;
    int numDataCodewords;

    if (compact) {
      numCodewords = 7;
      numDataCodewords = 2;
    } else {
      numCodewords = 10;
      numDataCodewords = 4;
    }

    int numECCodewords = numCodewords - numDataCodewords;
    int[] parameterWords = new int[numCodewords];
    for (int i = numCodewords - 1; i >= 0; --i) {
      parameterWords[i] = (int) parameterData & 0xF;
      parameterData >>= 4;
    }
    try {
      ReedSolomonDecoder rsDecoder = new ReedSolomonDecoder(GenericGF.AZTEC_PARAM);
      rsDecoder.decode(parameterWords, numECCodewords);
    } catch (ReedSolomonException ignored) {
      throw NotFoundException.getNotFoundInstance();
    }
    // Toss the error correction.  Just return the data as an integer
    int result = 0;
    for (int i = 0; i < numDataCodewords; i++) {
      result = (result << 4) + parameterWords[i];
    }
    return result;
  }

  /**
   * Finds the corners of a bull-eye centered on the passed point.
   * This returns the centers of the diagonal points just outside the bull's eye
   * Returns [topRight, bottomRight, bottomLeft, topLeft]
   *
   * @param pCenter Center point
   * @return The corners of the bull-eye
   * @throws NotFoundException If no valid bull-eye can be found
   */
  private ResultPoint[] getBullsEyeCorners(Point pCenter) throws NotFoundException {

    Point pina = pCenter;
    Point pinb = pCenter;
    Point pinc = pCenter;
    Point pind = pCenter;

    boolean color = true;

    for (nbCenterLayers = 1; nbCenterLayers < 9; nbCenterLayers++) {
      Point pouta = getFirstDifferent(pina, color, 1, -1);
      Point poutb = getFirstDifferent(pinb, color, 1, 1);
      Point poutc = getFirstDifferent(pinc, color, -1, 1);
      Point poutd = getFirstDifferent(pind, color, -1, -1);

      //d      a
      //
      //c      b

      if (nbCenterLayers > 2) {
        float q = distance(poutd, pouta) * nbCenterLayers / (distance(pind, pina) * (nbCenterLayers + 2));
        if (q < 0.75 || q > 1.25 || !isWhiteOrBlackRectangle(pouta, poutb, poutc, poutd)) {
          break;
        }
      }

      pina = pouta;
      pinb = poutb;
      pinc = poutc;
      pind = poutd;

      color = !color;
    }

    if (nbCenterLayers != 5 && nbCenterLayers != 7) {
      throw NotFoundException.getNotFoundInstance();
    }

    compact = nbCenterLayers == 5;

    // Expand the square by .5 pixel in each direction so that we're on the border
    // between the white square and the black square
    ResultPoint pinax = new ResultPoint(pina.getX() + 0.5f, pina.getY() - 0.5f);
    ResultPoint pinbx = new ResultPoint(pinb.getX() + 0.5f, pinb.getY() + 0.5f);
    ResultPoint pincx = new ResultPoint(pinc.getX() - 0.5f, pinc.getY() + 0.5f);
    ResultPoint pindx = new ResultPoint(pind.getX() - 0.5f, pind.getY() - 0.5f);

    // Expand the square so that its corners are the centers of the points
    // just outside the bull's eye.
    return expandSquare(new ResultPoint[]{pinax, pinbx, pincx, pindx},
                        2 * nbCenterLayers - 3,
                        2 * nbCenterLayers);
  }

  /**
   * Finds a candidate center point of an Aztec code from an image
   *
   * @return the center point
   */
  private Point getMatrixCenter() {

    ResultPoint pointA;
    ResultPoint pointB;
    ResultPoint pointC;
    ResultPoint pointD;

    //Get a white rectangle that can be the border of the matrix in center bull's eye or
    try {

      ResultPoint[] cornerPoints = new WhiteRectangleDetector(image).detect();
      pointA = cornerPoints[0];
      pointB = cornerPoints[1];
      pointC = cornerPoints[2];
      pointD = cornerPoints[3];

    } catch (NotFoundException e) {

      // This exception can be in case the initial rectangle is white
      // In that case, surely in the bull's eye, we try to expand the rectangle.
      int cx = image.getWidth() / 2;
      int cy = image.getHeight() / 2;
      pointA = getFirstDifferent(new Point(cx + 7, cy - 7), false, 1, -1).toResultPoint();
      pointB = getFirstDifferent(new Point(cx + 7, cy + 7), false, 1, 1).toResultPoint();
      pointC = getFirstDifferent(new Point(cx - 7, cy + 7), false, -1, 1).toResultPoint();
      pointD = getFirstDifferent(new Point(cx - 7, cy - 7), false, -1, -1).toResultPoint();

    }

    //Compute the center of the rectangle
    int cx = MathUtils.round((pointA.getX() + pointD.getX() + pointB.getX() + pointC.getX()) / 4.0f);
    int cy = MathUtils.round((pointA.getY() + pointD.getY() + pointB.getY() + pointC.getY()) / 4.0f);

    // Redetermine the white rectangle starting from previously computed center.
    // This will ensure that we end up with a white rectangle in center bull's eye
    // in order to compute a more accurate center.
    try {
      ResultPoint[] cornerPoints = new WhiteRectangleDetector(image, 15, cx, cy).detect();
      pointA = cornerPoints[0];
      pointB = cornerPoints[1];
      pointC = cornerPoints[2];
      pointD = cornerPoints[3];
    } catch (NotFoundException e) {
      // This exception can be in case the initial rectangle is white
      // In that case we try to expand the rectangle.
      pointA = getFirstDifferent(new Point(cx + 7, cy - 7), false, 1, -1).toResultPoint();
      pointB = getFirstDifferent(new Point(cx + 7, cy + 7), false, 1, 1).toResultPoint();
      pointC = getFirstDifferent(new Point(cx - 7, cy + 7), false, -1, 1).toResultPoint();
      pointD = getFirstDifferent(new Point(cx - 7, cy - 7), false, -1, -1).toResultPoint();
    }

    // Recompute the center of the rectangle
    cx = MathUtils.round((pointA.getX() + pointD.getX() + pointB.getX() + pointC.getX()) / 4.0f);
    cy = MathUtils.round((pointA.getY() + pointD.getY() + pointB.getY() + pointC.getY()) / 4.0f);

    return new Point(cx, cy);
  }

  /**
   * Gets the Aztec code corners from the bull's eye corners and the parameters.
   *
   * @param bullsEyeCorners the array of bull's eye corners
   * @return the array of aztec code corners
   */
  private ResultPoint[] getMatrixCornerPoints(ResultPoint[] bullsEyeCorners) {
    return expandSquare(bullsEyeCorners, 2 * nbCenterLayers, getDimension());
  }

  /**
   * Creates a BitMatrix by sampling the provided image.
   * topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the
   * diagonal just outside the bull's eye.
   */
  private BitMatrix sampleGrid(BitMatrix image,
                               ResultPoint topLeft,
                               ResultPoint topRight,
                               ResultPoint bottomRight,
                               ResultPoint bottomLeft) throws NotFoundException {

    GridSampler sampler = GridSampler.getInstance();
    int dimension = getDimension();

    float low = dimension / 2.0f - nbCenterLayers;
    float high = dimension / 2.0f + nbCenterLayers;

    return sampler.sampleGrid(image,
                              dimension,
                              dimension,
                              low, low,   // topleft
                              high, low,  // topright
                              high, high, // bottomright
                              low, high,  // bottomleft
                              topLeft.getX(), topLeft.getY(),
                              topRight.getX(), topRight.getY(),
                              bottomRight.getX(), bottomRight.getY(),
                              bottomLeft.getX(), bottomLeft.getY());
  }

  /**
   * Samples a line.
   *
   * @param p1   start point (inclusive)
   * @param p2   end point (exclusive)
   * @param size number of bits
   * @return the array of bits as an int (first bit is high-order bit of result)
   */
  private int sampleLine(ResultPoint p1, ResultPoint p2, int size) {
    int result = 0;

    float d = distance(p1, p2);
    float moduleSize = d / size;
    float px = p1.getX();
    float py = p1.getY();
    float dx = moduleSize * (p2.getX() - p1.getX()) / d;
    float dy = moduleSize * (p2.getY() - p1.getY()) / d;
    for (int i = 0; i < size; i++) {
      if (image.get(MathUtils.round(px + i * dx), MathUtils.round(py + i * dy))) {
        result |= 1 << (size - i - 1);
      }
    }
    return result;
  }

  /**
   * @return true if the border of the rectangle passed in parameter is compound of white points only
   *         or black points only
   */
  private boolean isWhiteOrBlackRectangle(Point p1,
                                          Point p2,
                                          Point p3,
                                          Point p4) {

    int corr = 3;

    p1 = new Point(p1.getX() - corr, p1.getY() + corr);
    p2 = new Point(p2.getX() - corr, p2.getY() - corr);
    p3 = new Point(p3.getX() + corr, p3.getY() - corr);
    p4 = new Point(p4.getX() + corr, p4.getY() + corr);

    int cInit = getColor(p4, p1);

    if (cInit == 0) {
      return false;
    }

    int c = getColor(p1, p2);

    if (c != cInit) {
      return false;
    }

    c = getColor(p2, p3);

    if (c != cInit) {
      return false;
    }

    c = getColor(p3, p4);

    return c == cInit;

  }

  /**
   * Gets the color of a segment
   *
   * @return 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else
   */
  private int getColor(Point p1, Point p2) {
    float d = distance(p1, p2);
    float dx = (p2.getX() - p1.getX()) / d;
    float dy = (p2.getY() - p1.getY()) / d;
    int error = 0;

    float px = p1.getX();
    float py = p1.getY();

    boolean colorModel = image.get(p1.getX(), p1.getY());

    int iMax = (int) Math.ceil(d);
    for (int i = 0; i < iMax; i++) {
      px += dx;
      py += dy;
      if (image.get(MathUtils.round(px), MathUtils.round(py)) != colorModel) {
        error++;
      }
    }

    float errRatio = error / d;

    if (errRatio > 0.1f && errRatio < 0.9f) {
      return 0;
    }

    return (errRatio <= 0.1f) == colorModel ? 1 : -1;
  }

  /**
   * Gets the coordinate of the first point with a different color in the given direction
   */
  private Point getFirstDifferent(Point init, boolean color, int dx, int dy) {
    int x = init.getX() + dx;
    int y = init.getY() + dy;

    while (isValid(x, y) && image.get(x, y) == color) {
      x += dx;
      y += dy;
    }

    x -= dx;
    y -= dy;

    while (isValid(x, y) && image.get(x, y) == color) {
      x += dx;
    }
    x -= dx;

    while (isValid(x, y) && image.get(x, y) == color) {
      y += dy;
    }
    y -= dy;

    return new Point(x, y);
  }

  /**
   * Expand the square represented by the corner points by pushing out equally in all directions
   *
   * @param cornerPoints the corners of the square, which has the bull's eye at its center
   * @param oldSide the original length of the side of the square in the target bit matrix
   * @param newSide the new length of the size of the square in the target bit matrix
   * @return the corners of the expanded square
   */
  private static ResultPoint[] expandSquare(ResultPoint[] cornerPoints, int oldSide, int newSide) {
    float ratio = newSide / (2.0f * oldSide);
    float dx = cornerPoints[0].getX() - cornerPoints[2].getX();
    float dy = cornerPoints[0].getY() - cornerPoints[2].getY();
    float centerx = (cornerPoints[0].getX() + cornerPoints[2].getX()) / 2.0f;
    float centery = (cornerPoints[0].getY() + cornerPoints[2].getY()) / 2.0f;

    ResultPoint result0 = new ResultPoint(centerx + ratio * dx, centery + ratio * dy);
    ResultPoint result2 = new ResultPoint(centerx - ratio * dx, centery - ratio * dy);

    dx = cornerPoints[1].getX() - cornerPoints[3].getX();
    dy = cornerPoints[1].getY() - cornerPoints[3].getY();
    centerx = (cornerPoints[1].getX() + cornerPoints[3].getX()) / 2.0f;
    centery = (cornerPoints[1].getY() + cornerPoints[3].getY()) / 2.0f;
    ResultPoint result1 = new ResultPoint(centerx + ratio * dx, centery + ratio * dy);
    ResultPoint result3 = new ResultPoint(centerx - ratio * dx, centery - ratio * dy);

    return new ResultPoint[]{result0, result1, result2, result3};
  }

  private boolean isValid(int x, int y) {
    return x >= 0 && x < image.getWidth() && y > 0 && y < image.getHeight();
  }

  private boolean isValid(ResultPoint point) {
    int x = MathUtils.round(point.getX());
    int y = MathUtils.round(point.getY());
    return isValid(x, y);
  }

  private static float distance(Point a, Point b) {
    return MathUtils.distance(a.getX(), a.getY(), b.getX(), b.getY());
  }

  private static float distance(ResultPoint a, ResultPoint b) {
    return MathUtils.distance(a.getX(), a.getY(), b.getX(), b.getY());
  }

  private int getDimension() {
    if (compact) {
      return 4 * nbLayers + 11;
    }
    if (nbLayers <= 4) {
      return 4 * nbLayers + 15;
    }
    return 4 * nbLayers + 2 * ((nbLayers - 4) / 8 + 1) + 15;
  }

  static final class Point {
    private final int x;
    private final int y;

    ResultPoint toResultPoint() {
      return new ResultPoint(getX(), getY());
    }

    Point(int x, int y) {
      this.x = x;
      this.y = y;
    }

    int getX() {
      return x;
    }

    int getY() {
      return y;
    }

    @Override
    public String toString() {
      return "<" + x + ' ' + y + '>';
    }
  }
}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/AztecCode.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import com.google.zxing.common.BitMatrix;

/**
 * Aztec 2D code representation
 *
 * @author Rustam Abdullaev
 */
public final class AztecCode {

  private boolean compact;
  private int size;
  private int layers;
  private int codeWords;
  private BitMatrix matrix;

  /**
   * @return {@code true} if compact instead of full mode
   */
  public boolean isCompact() {
    return compact;
  }

  public void setCompact(boolean compact) {
    this.compact = compact;
  }

  /**
   * @return size in pixels (width and height)
   */
  public int getSize() {
    return size;
  }

  public void setSize(int size) {
    this.size = size;
  }

  /**
   * @return number of levels
   */
  public int getLayers() {
    return layers;
  }

  public void setLayers(int layers) {
    this.layers = layers;
  }

  /**
   * @return number of data codewords
   */
  public int getCodeWords() {
    return codeWords;
  }

  public void setCodeWords(int codeWords) {
    this.codeWords = codeWords;
  }

  /**
   * @return the symbol image
   */
  public BitMatrix getMatrix() {
    return matrix;
  }

  public void setMatrix(BitMatrix matrix) {
    this.matrix = matrix;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/BinaryShiftToken.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import com.google.zxing.common.BitArray;

final class BinaryShiftToken extends Token {

  private final short binaryShiftStart;
  private final short binaryShiftByteCount;

  BinaryShiftToken(Token previous,
                   int binaryShiftStart,
                   int binaryShiftByteCount) {
    super(previous);
    this.binaryShiftStart = (short) binaryShiftStart;
    this.binaryShiftByteCount = (short) binaryShiftByteCount;
  }

  @Override
  public void appendTo(BitArray bitArray, byte[] text) {
    for (int i = 0; i < binaryShiftByteCount; i++) {
      if (i == 0 || (i == 31 && binaryShiftByteCount <= 62)) {
        // We need a header before the first character, and before
        // character 31 when the total byte code is <= 62
        bitArray.appendBits(31, 5);  // BINARY_SHIFT
        if (binaryShiftByteCount > 62) {
          bitArray.appendBits(binaryShiftByteCount - 31, 16);
        } else if (i == 0) {
          // 1 <= binaryShiftByteCode <= 62
          bitArray.appendBits(Math.min(binaryShiftByteCount, 31), 5);
        } else {
          // 32 <= binaryShiftCount <= 62 and i == 31
          bitArray.appendBits(binaryShiftByteCount - 31, 5);
        }
      }
      bitArray.appendBits(text[binaryShiftStart + i], 8);
    }
  }

  @Override
  public String toString() {
    return "<" + binaryShiftStart + "::" + (binaryShiftStart + binaryShiftByteCount - 1) + '>';
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/Encoder.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import com.google.zxing.common.BitArray;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.reedsolomon.GenericGF;
import com.google.zxing.common.reedsolomon.ReedSolomonEncoder;

/**
 * Generates Aztec 2D barcodes.
 *
 * @author Rustam Abdullaev
 */
public final class Encoder {

  public static final int DEFAULT_EC_PERCENT = 33; // default minimal percentage of error check words
  public static final int DEFAULT_AZTEC_LAYERS = 0;
  private static final int MAX_NB_BITS = 32;
  private static final int MAX_NB_BITS_COMPACT = 4;

  private static final int[] WORD_SIZE = {
    4, 6, 6, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12
  };

  private Encoder() {
  }

  /**
   * Encodes the given binary content as an Aztec symbol
   *
   * @param data input data string
   * @return Aztec symbol matrix with metadata
   */
  public static AztecCode encode(byte[] data) {
    return encode(data, DEFAULT_EC_PERCENT, DEFAULT_AZTEC_LAYERS);
  }

  /**
   * Encodes the given binary content as an Aztec symbol
   *
   * @param data input data string
   * @param minECCPercent minimal percentage of error check words (According to ISO/IEC 24778:2008,
   *                      a minimum of 23% + 3 words is recommended)
   * @param userSpecifiedLayers if non-zero, a user-specified value for the number of layers
   * @return Aztec symbol matrix with metadata
   */
  public static AztecCode encode(byte[] data, int minECCPercent, int userSpecifiedLayers) {
    // High-level encode
    BitArray bits = new HighLevelEncoder(data).encode();

    // stuff bits and choose symbol size
    int eccBits = bits.getSize() * minECCPercent / 100 + 11;
    int totalSizeBits = bits.getSize() + eccBits;
    boolean compact;
    int layers;
    int totalBitsInLayer;
    int wordSize;
    BitArray stuffedBits;
    if (userSpecifiedLayers != DEFAULT_AZTEC_LAYERS) {
      compact = userSpecifiedLayers < 0;
      layers = Math.abs(userSpecifiedLayers);
      if (layers > (compact ? MAX_NB_BITS_COMPACT : MAX_NB_BITS)) {
        throw new IllegalArgumentException(
            String.format("Illegal value %s for layers", userSpecifiedLayers));
      }
      totalBitsInLayer = totalBitsInLayer(layers, compact);
      wordSize = WORD_SIZE[layers];
      int usableBitsInLayers = totalBitsInLayer - (totalBitsInLayer % wordSize);
      stuffedBits = stuffBits(bits, wordSize);
      if (stuffedBits.getSize() + eccBits > usableBitsInLayers) {
        throw new IllegalArgumentException("Data to large for user specified layer");
      }
      if (compact && stuffedBits.getSize() > wordSize * 64) {
        // Compact format only allows 64 data words, though C4 can hold more words than that
        throw new IllegalArgumentException("Data to large for user specified layer");
      }
    } else {
      wordSize = 0;
      stuffedBits = null;
      // We look at the possible table sizes in the order Compact1, Compact2, Compact3,
      // Compact4, Normal4,...  Normal(i) for i < 4 isn't typically used since Compact(i+1)
      // is the same size, but has more data.
      for (int i = 0; ; i++) {
        if (i > MAX_NB_BITS) {
          throw new IllegalArgumentException("Data too large for an Aztec code");
        }
        compact = i <= 3;
        layers = compact ? i + 1 : i;
        totalBitsInLayer = totalBitsInLayer(layers, compact);
        if (totalSizeBits > totalBitsInLayer) {
          continue;
        }
        // [Re]stuff the bits if this is the first opportunity, or if the
        // wordSize has changed
        if (stuffedBits == null || wordSize != WORD_SIZE[layers]) {
          wordSize = WORD_SIZE[layers];
          stuffedBits = stuffBits(bits, wordSize);
        }
        int usableBitsInLayers = totalBitsInLayer - (totalBitsInLayer % wordSize);
        if (compact && stuffedBits.getSize() > wordSize * 64) {
          // Compact format only allows 64 data words, though C4 can hold more words than that
          continue;
        }
        if (stuffedBits.getSize() + eccBits <= usableBitsInLayers) {
          break;
        }
      }
    }
    BitArray messageBits = generateCheckWords(stuffedBits, totalBitsInLayer, wordSize);

    // generate mode message
    int messageSizeInWords = stuffedBits.getSize() / wordSize;
    BitArray modeMessage = generateModeMessage(compact, layers, messageSizeInWords);

    // allocate symbol
    int baseMatrixSize = (compact ? 11 : 14) + layers * 4; // not including alignment lines
    int[] alignmentMap = new int[baseMatrixSize];
    int matrixSize;
    if (compact) {
      // no alignment marks in compact mode, alignmentMap is a no-op
      matrixSize = baseMatrixSize;
      for (int i = 0; i < alignmentMap.length; i++) {
        alignmentMap[i] = i;
      }
    } else {
      matrixSize = baseMatrixSize + 1 + 2 * ((baseMatrixSize / 2 - 1) / 15);
      int origCenter = baseMatrixSize / 2;
      int center = matrixSize / 2;
      for (int i = 0; i < origCenter; i++) {
        int newOffset = i + i / 15;
        alignmentMap[origCenter - i - 1] = center - newOffset - 1;
        alignmentMap[origCenter + i] = center + newOffset + 1;
      }
    }
    BitMatrix matrix = new BitMatrix(matrixSize);

    // draw data bits
    for (int i = 0, rowOffset = 0; i < layers; i++) {
      int rowSize = (layers - i) * 4 + (compact ? 9 : 12);
      for (int j = 0; j < rowSize; j++) {
        int columnOffset = j * 2;
        for (int k = 0; k < 2; k++) {
          if (messageBits.get(rowOffset + columnOffset + k)) {
            matrix.set(alignmentMap[i * 2 + k], alignmentMap[i * 2 + j]);
          }
          if (messageBits.get(rowOffset + rowSize * 2 + columnOffset + k)) {
            matrix.set(alignmentMap[i * 2 + j], alignmentMap[baseMatrixSize - 1 - i * 2 - k]);
          }
          if (messageBits.get(rowOffset + rowSize * 4 + columnOffset + k)) {
            matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - k], alignmentMap[baseMatrixSize - 1 - i * 2 - j]);
          }
          if (messageBits.get(rowOffset + rowSize * 6 + columnOffset + k)) {
            matrix.set(alignmentMap[baseMatrixSize - 1 - i * 2 - j], alignmentMap[i * 2 + k]);
          }
        }
      }
      rowOffset += rowSize * 8;
    }

    // draw mode message
    drawModeMessage(matrix, compact, matrixSize, modeMessage);

    // draw alignment marks
    if (compact) {
      drawBullsEye(matrix, matrixSize / 2, 5);
    } else {
      drawBullsEye(matrix, matrixSize / 2, 7);
      for (int i = 0, j = 0; i < baseMatrixSize / 2 - 1; i += 15, j += 16) {
        for (int k = (matrixSize / 2) & 1; k < matrixSize; k += 2) {
          matrix.set(matrixSize / 2 - j, k);
          matrix.set(matrixSize / 2 + j, k);
          matrix.set(k, matrixSize / 2 - j);
          matrix.set(k, matrixSize / 2 + j);
        }
      }
    }

    AztecCode aztec = new AztecCode();
    aztec.setCompact(compact);
    aztec.setSize(matrixSize);
    aztec.setLayers(layers);
    aztec.setCodeWords(messageSizeInWords);
    aztec.setMatrix(matrix);
    return aztec;
  }

  private static void drawBullsEye(BitMatrix matrix, int center, int size) {
    for (int i = 0; i < size; i += 2) {
      for (int j = center - i; j <= center + i; j++) {
        matrix.set(j, center - i);
        matrix.set(j, center + i);
        matrix.set(center - i, j);
        matrix.set(center + i, j);
      }
    }
    matrix.set(center - size, center - size);
    matrix.set(center - size + 1, center - size);
    matrix.set(center - size, center - size + 1);
    matrix.set(center + size, center - size);
    matrix.set(center + size, center - size + 1);
    matrix.set(center + size, center + size - 1);
  }

  static BitArray generateModeMessage(boolean compact, int layers, int messageSizeInWords) {
    BitArray modeMessage = new BitArray();
    if (compact) {
      modeMessage.appendBits(layers - 1, 2);
      modeMessage.appendBits(messageSizeInWords - 1, 6);
      modeMessage = generateCheckWords(modeMessage, 28, 4);
    } else {
      modeMessage.appendBits(layers - 1, 5);
      modeMessage.appendBits(messageSizeInWords - 1, 11);
      modeMessage = generateCheckWords(modeMessage, 40, 4);
    }
    return modeMessage;
  }

  private static void drawModeMessage(BitMatrix matrix, boolean compact, int matrixSize, BitArray modeMessage) {
    int center = matrixSize / 2;
    if (compact) {
      for (int i = 0; i < 7; i++) {
        int offset = center - 3 + i;
        if (modeMessage.get(i)) {
          matrix.set(offset, center - 5);
        }
        if (modeMessage.get(i + 7)) {
          matrix.set(center + 5, offset);
        }
        if (modeMessage.get(20 - i)) {
          matrix.set(offset, center + 5);
        }
        if (modeMessage.get(27 - i)) {
          matrix.set(center - 5, offset);
        }
      }
    } else {
      for (int i = 0; i < 10; i++) {
        int offset = center - 5 + i + i / 5;
        if (modeMessage.get(i)) {
          matrix.set(offset, center - 7);
        }
        if (modeMessage.get(i + 10)) {
          matrix.set(center + 7, offset);
        }
        if (modeMessage.get(29 - i)) {
          matrix.set(offset, center + 7);
        }
        if (modeMessage.get(39 - i)) {
          matrix.set(center - 7, offset);
        }
      }
    }
  }

  private static BitArray generateCheckWords(BitArray bitArray, int totalBits, int wordSize) {
    // bitArray is guaranteed to be a multiple of the wordSize, so no padding needed
    int messageSizeInWords = bitArray.getSize() / wordSize;
    ReedSolomonEncoder rs = new ReedSolomonEncoder(getGF(wordSize));
    int totalWords = totalBits / wordSize;
    int[] messageWords = bitsToWords(bitArray, wordSize, totalWords);
    rs.encode(messageWords, totalWords - messageSizeInWords);
    int startPad = totalBits % wordSize;
    BitArray messageBits = new BitArray();
    messageBits.appendBits(0, startPad);
    for (int messageWord : messageWords) {
      messageBits.appendBits(messageWord, wordSize);
    }
    return messageBits;
  }

  private static int[] bitsToWords(BitArray stuffedBits, int wordSize, int totalWords) {
    int[] message = new int[totalWords];
    int i;
    int n;
    for (i = 0, n = stuffedBits.getSize() / wordSize; i < n; i++) {
      int value = 0;
      for (int j = 0; j < wordSize; j++) {
        value |= stuffedBits.get(i * wordSize + j) ? (1 << wordSize - j - 1) : 0;
      }
      message[i] = value;
    }
    return message;
  }

  private static GenericGF getGF(int wordSize) {
    switch (wordSize) {
      case 4:
        return GenericGF.AZTEC_PARAM;
      case 6:
        return GenericGF.AZTEC_DATA_6;
      case 8:
        return GenericGF.AZTEC_DATA_8;
      case 10:
        return GenericGF.AZTEC_DATA_10;
      case 12:
        return GenericGF.AZTEC_DATA_12;
      default:
        throw new IllegalArgumentException("Unsupported word size " + wordSize);
    }
  }

  static BitArray stuffBits(BitArray bits, int wordSize) {
    BitArray out = new BitArray();

    int n = bits.getSize();
    int mask = (1 << wordSize) - 2;
    for (int i = 0; i < n; i += wordSize) {
      int word = 0;
      for (int j = 0; j < wordSize; j++) {
        if (i + j >= n || bits.get(i + j)) {
          word |= 1 << (wordSize - 1 - j);
        }
      }
      if ((word & mask) == mask) {
        out.appendBits(word & mask, wordSize);
        i--;
      } else if ((word & mask) == 0) {
        out.appendBits(word | 1, wordSize);
        i--;
      } else {
        out.appendBits(word, wordSize);
      }
    }
    return out;
  }

  private static int totalBitsInLayer(int layers, boolean compact) {
    return ((compact ? 88 : 112) + 16 * layers) * layers;
  }
}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/HighLevelEncoder.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import com.google.zxing.common.BitArray;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedList;

/**
 * This produces nearly optimal encodings of text into the first-level of
 * encoding used by Aztec code.
 *
 * It uses a dynamic algorithm.  For each prefix of the string, it determines
 * a set of encodings that could lead to this prefix.  We repeatedly add a
 * character and generate a new set of optimal encodings until we have read
 * through the entire input.
 *
 * @author Frank Yellin
 * @author Rustam Abdullaev
 */
public final class HighLevelEncoder {

  static final String[] MODE_NAMES = {"UPPER", "LOWER", "DIGIT", "MIXED", "PUNCT"};

  static final int MODE_UPPER = 0; // 5 bits
  static final int MODE_LOWER = 1; // 5 bits
  static final int MODE_DIGIT = 2; // 4 bits
  static final int MODE_MIXED = 3; // 5 bits
  static final int MODE_PUNCT = 4; // 5 bits

  // The Latch Table shows, for each pair of Modes, the optimal method for
  // getting from one mode to another.  In the worst possible case, this can
  // be up to 14 bits.  In the best possible case, we are already there!
  // The high half-word of each entry gives the number of bits.
  // The low half-word of each entry are the actual bits necessary to change
  static final int[][] LATCH_TABLE = {
    {
      0,
      (5 << 16) + 28,              // UPPER -> LOWER
      (5 << 16) + 30,              // UPPER -> DIGIT
      (5 << 16) + 29,              // UPPER -> MIXED
      (10 << 16) + (29 << 5) + 30, // UPPER -> MIXED -> PUNCT
    },
    {
      (9 << 16) + (30 << 4) + 14,  // LOWER -> DIGIT -> UPPER
      0,
      (5 << 16) + 30,              // LOWER -> DIGIT
      (5 << 16) + 29,              // LOWER -> MIXED
      (10 << 16) + (29 << 5) + 30, // LOWER -> MIXED -> PUNCT
    },
    {
      (4 << 16) + 14,              // DIGIT -> UPPER
      (9 << 16) + (14 << 5) + 28,  // DIGIT -> UPPER -> LOWER
      0,
      (9 << 16) + (14 << 5) + 29,  // DIGIT -> UPPER -> MIXED
      (14 << 16) + (14 << 10) + (29 << 5) + 30,
                                   // DIGIT -> UPPER -> MIXED -> PUNCT
    },
    {
      (5 << 16) + 29,              // MIXED -> UPPER
      (5 << 16) + 28,              // MIXED -> LOWER
      (10 << 16) + (29 << 5) + 30, // MIXED -> UPPER -> DIGIT
      0,
      (5 << 16) + 30,              // MIXED -> PUNCT
    },
    {
      (5 << 16) + 31,              // PUNCT -> UPPER
      (10 << 16) + (31 << 5) + 28, // PUNCT -> UPPER -> LOWER
      (10 << 16) + (31 << 5) + 30, // PUNCT -> UPPER -> DIGIT
      (10 << 16) + (31 << 5) + 29, // PUNCT -> UPPER -> MIXED
      0,
    },
  };

  // A reverse mapping from [mode][char] to the encoding for that character
  // in that mode.  An entry of 0 indicates no mapping exists.
  private static final int[][] CHAR_MAP = new int[5][256];
  static {
    CHAR_MAP[MODE_UPPER][' '] = 1;
    for (int c = 'A'; c <= 'Z'; c++) {
      CHAR_MAP[MODE_UPPER][c] = c - 'A' + 2;
    }
    CHAR_MAP[MODE_LOWER][' '] = 1;
    for (int c = 'a'; c <= 'z'; c++) {
      CHAR_MAP[MODE_LOWER][c] = c - 'a' + 2;
    }
    CHAR_MAP[MODE_DIGIT][' '] = 1;
    for (int c = '0'; c <= '9'; c++) {
      CHAR_MAP[MODE_DIGIT][c] = c - '0' + 2;
    }
    CHAR_MAP[MODE_DIGIT][','] = 12;
    CHAR_MAP[MODE_DIGIT]['.'] = 13;
    int[] mixedTable = {
        '\0', ' ', '\1', '\2', '\3', '\4', '\5', '\6', '\7', '\b', '\t', '\n',
        '\13', '\f', '\r', '\33', '\34', '\35', '\36', '\37', '@', '\\', '^',
        '_', '`', '|', '~', '\177'
    };
    for (int i = 0; i < mixedTable.length; i++) {
      CHAR_MAP[MODE_MIXED][mixedTable[i]] = i;
    }
    int[] punctTable = {
        '\0', '\r', '\0', '\0', '\0', '\0', '!', '\'', '#', '$', '%', '&', '\'',
        '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?',
        '[', ']', '{', '}'
    };
    for (int i = 0; i < punctTable.length; i++) {
      if (punctTable[i] > 0) {
        CHAR_MAP[MODE_PUNCT][punctTable[i]] = i;
      }
    }
  }

  // A map showing the available shift codes.  (The shifts to BINARY are not
  // shown
  static final int[][] SHIFT_TABLE = new int[6][6]; // mode shift codes, per table
  static {
    for (int[] table : SHIFT_TABLE) {
      Arrays.fill(table, -1);
    }
    SHIFT_TABLE[MODE_UPPER][MODE_PUNCT] = 0;

    SHIFT_TABLE[MODE_LOWER][MODE_PUNCT] = 0;
    SHIFT_TABLE[MODE_LOWER][MODE_UPPER] = 28;

    SHIFT_TABLE[MODE_MIXED][MODE_PUNCT] = 0;

    SHIFT_TABLE[MODE_DIGIT][MODE_PUNCT] = 0;
    SHIFT_TABLE[MODE_DIGIT][MODE_UPPER] = 15;
  }

  private final byte[] text;

  public HighLevelEncoder(byte[] text) {
    this.text = text;
  }

  /**
   * @return text represented by this encoder encoded as a {@link BitArray}
   */
  public BitArray encode() {
    Collection<State> states = Collections.singletonList(State.INITIAL_STATE);
    for (int index = 0; index < text.length; index++) {
      int pairCode;
      int nextChar = index + 1 < text.length ? text[index + 1] : 0;
      switch (text[index]) {
        case '\r':
          pairCode = nextChar == '\n' ? 2 : 0;
          break;
        case '.' :
          pairCode = nextChar == ' ' ? 3 : 0;
          break;
        case ',' :
          pairCode = nextChar == ' ' ? 4 : 0;
          break;
        case ':' :
          pairCode = nextChar == ' ' ? 5 : 0;
          break;
        default:
          pairCode = 0;
      }
      if (pairCode > 0) {
        // We have one of the four special PUNCT pairs.  Treat them specially.
        // Get a new set of states for the two new characters.
        states = updateStateListForPair(states, index, pairCode);
        index++;
      } else {
        // Get a new set of states for the new character.
        states = updateStateListForChar(states, index);
      }
    }
    // We are left with a set of states.  Find the shortest one.
    State minState = Collections.min(states, new Comparator<State>() {
      @Override
      public int compare(State a, State b) {
        return a.getBitCount() - b.getBitCount();
      }
    });
    // Convert it to a bit array, and return.
    return minState.toBitArray(text);
  }

  // We update a set of states for a new character by updating each state
  // for the new character, merging the results, and then removing the
  // non-optimal states.
  private Collection<State> updateStateListForChar(Iterable<State> states, int index) {
    Collection<State> result = new LinkedList<>();
    for (State state : states) {
      updateStateForChar(state, index, result);
    }
    return simplifyStates(result);
  }

  // Return a set of states that represent the possible ways of updating this
  // state for the next character.  The resulting set of states are added to
  // the "result" list.
  private void updateStateForChar(State state, int index, Collection<State> result) {
    char ch = (char) (text[index] & 0xFF);
    boolean charInCurrentTable = CHAR_MAP[state.getMode()][ch] > 0;
    State stateNoBinary = null;
    for (int mode = 0; mode <= MODE_PUNCT; mode++) {
      int charInMode = CHAR_MAP[mode][ch];
      if (charInMode > 0) {
        if (stateNoBinary == null) {
          // Only create stateNoBinary the first time it's required.
          stateNoBinary = state.endBinaryShift(index);
        }
        // Try generating the character by latching to its mode
        if (!charInCurrentTable || mode == state.getMode() || mode == MODE_DIGIT) {
          // If the character is in the current table, we don't want to latch to
          // any other mode except possibly digit (which uses only 4 bits).  Any
          // other latch would be equally successful *after* this character, and
          // so wouldn't save any bits.
          State latchState = stateNoBinary.latchAndAppend(mode, charInMode);
          result.add(latchState);
        }
        // Try generating the character by switching to its mode.
        if (!charInCurrentTable && SHIFT_TABLE[state.getMode()][mode] >= 0) {
          // It never makes sense to temporarily shift to another mode if the
          // character exists in the current mode.  That can never save bits.
          State shiftState = stateNoBinary.shiftAndAppend(mode, charInMode);
          result.add(shiftState);
        }
      }
    }
    if (state.getBinaryShiftByteCount() > 0 || CHAR_MAP[state.getMode()][ch] == 0) {
      // It's never worthwhile to go into binary shift mode if you're not already
      // in binary shift mode, and the character exists in your current mode.
      // That can never save bits over just outputting the char in the current mode.
      State binaryState = state.addBinaryShiftChar(index);
      result.add(binaryState);
    }
  }

  private static Collection<State> updateStateListForPair(Iterable<State> states, int index, int pairCode) {
    Collection<State> result = new LinkedList<>();
    for (State state : states) {
      updateStateForPair(state, index, pairCode, result);
    }
    return simplifyStates(result);
  }

  private static void updateStateForPair(State state, int index, int pairCode, Collection<State> result) {
    State stateNoBinary = state.endBinaryShift(index);
    // Possibility 1.  Latch to MODE_PUNCT, and then append this code
    result.add(stateNoBinary.latchAndAppend(MODE_PUNCT, pairCode));
    if (state.getMode() != MODE_PUNCT) {
      // Possibility 2.  Shift to MODE_PUNCT, and then append this code.
      // Every state except MODE_PUNCT (handled above) can shift
      result.add(stateNoBinary.shiftAndAppend(MODE_PUNCT, pairCode));
    }
    if (pairCode == 3 || pairCode == 4) {
      // both characters are in DIGITS.  Sometimes better to just add two digits
      State digitState = stateNoBinary
          .latchAndAppend(MODE_DIGIT, 16 - pairCode)  // period or comma in DIGIT
          .latchAndAppend(MODE_DIGIT, 1);             // space in DIGIT
      result.add(digitState);
    }
    if (state.getBinaryShiftByteCount() > 0) {
      // It only makes sense to do the characters as binary if we're already
      // in binary mode.
      State binaryState = state.addBinaryShiftChar(index).addBinaryShiftChar(index + 1);
      result.add(binaryState);
    }
  }

  private static Collection<State> simplifyStates(Iterable<State> states) {
    Collection<State> result = new LinkedList<>();
    for (State newState : states) {
      boolean add = true;
      for (Iterator<State> iterator = result.iterator(); iterator.hasNext();) {
        State oldState = iterator.next();
        if (oldState.isBetterThanOrEqualTo(newState)) {
          add = false;
          break;
        }
        if (newState.isBetterThanOrEqualTo(oldState)) {
          iterator.remove();
        }
      }
      if (add) {
        result.add(newState);
      }
    }
    return result;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/SimpleToken.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import com.google.zxing.common.BitArray;

final class SimpleToken extends Token {

  // For normal words, indicates value and bitCount
  private final short value;
  private final short bitCount;

  SimpleToken(Token previous, int value, int bitCount) {
    super(previous);
    this.value = (short) value;
    this.bitCount = (short) bitCount;
  }

  @Override
  void appendTo(BitArray bitArray, byte[] text) {
    bitArray.appendBits(value, bitCount);
  }

  @Override
  public String toString() {
    int value = this.value & ((1 << bitCount) - 1);
    value |= 1 << bitCount;
    return '<' + Integer.toBinaryString(value | (1 << bitCount)).substring(1) + '>';
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/State.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import java.util.Deque;
import java.util.LinkedList;

import com.google.zxing.common.BitArray;

/**
 * State represents all information about a sequence necessary to generate the current output.
 * Note that a state is immutable.
 */
final class State {

  static final State INITIAL_STATE = new State(Token.EMPTY, HighLevelEncoder.MODE_UPPER, 0, 0);

  // The current mode of the encoding (or the mode to which we'll return if
  // we're in Binary Shift mode.
  private final int mode;
  // The list of tokens that we output.  If we are in Binary Shift mode, this
  // token list does *not* yet included the token for those bytes
  private final Token token;
  // If non-zero, the number of most recent bytes that should be output
  // in Binary Shift mode.
  private final int binaryShiftByteCount;
  // The total number of bits generated (including Binary Shift).
  private final int bitCount;

  private State(Token token, int mode, int binaryBytes, int bitCount) {
    this.token = token;
    this.mode = mode;
    this.binaryShiftByteCount = binaryBytes;
    this.bitCount = bitCount;
    // Make sure we match the token
    //int binaryShiftBitCount = (binaryShiftByteCount * 8) +
    //    (binaryShiftByteCount == 0 ? 0 :
    //     binaryShiftByteCount <= 31 ? 10 :
    //     binaryShiftByteCount <= 62 ? 20 : 21);
    //assert this.bitCount == token.getTotalBitCount() + binaryShiftBitCount;
  }

  int getMode() {
    return mode;
  }

  Token getToken() {
    return token;
  }

  int getBinaryShiftByteCount() {
    return binaryShiftByteCount;
  }

  int getBitCount() {
    return bitCount;
  }

  // Create a new state representing this state with a latch to a (not
  // necessary different) mode, and then a code.
  State latchAndAppend(int mode, int value) {
    //assert binaryShiftByteCount == 0;
    int bitCount = this.bitCount;
    Token token = this.token;
    if (mode != this.mode) {
      int latch = HighLevelEncoder.LATCH_TABLE[this.mode][mode];
      token = token.add(latch & 0xFFFF, latch >> 16);
      bitCount += latch >> 16;
    }
    int latchModeBitCount = mode == HighLevelEncoder.MODE_DIGIT ? 4 : 5;
    token = token.add(value, latchModeBitCount);
    return new State(token, mode, 0, bitCount + latchModeBitCount);
  }

  // Create a new state representing this state, with a temporary shift
  // to a different mode to output a single value.
  State shiftAndAppend(int mode, int value) {
    //assert binaryShiftByteCount == 0 && this.mode != mode;
    Token token = this.token;
    int thisModeBitCount = this.mode == HighLevelEncoder.MODE_DIGIT ? 4 : 5;
    // Shifts exist only to UPPER and PUNCT, both with tokens size 5.
    token = token.add(HighLevelEncoder.SHIFT_TABLE[this.mode][mode], thisModeBitCount);
    token = token.add(value, 5);
    return new State(token, this.mode, 0, this.bitCount + thisModeBitCount + 5);
  }

  // Create a new state representing this state, but an additional character
  // output in Binary Shift mode.
  State addBinaryShiftChar(int index) {
    Token token = this.token;
    int mode = this.mode;
    int bitCount = this.bitCount;
    if (this.mode == HighLevelEncoder.MODE_PUNCT || this.mode == HighLevelEncoder.MODE_DIGIT) {
      //assert binaryShiftByteCount == 0;
      int latch = HighLevelEncoder.LATCH_TABLE[mode][HighLevelEncoder.MODE_UPPER];
      token = token.add(latch & 0xFFFF, latch >> 16);
      bitCount += latch >> 16;
      mode = HighLevelEncoder.MODE_UPPER;
    }
    int deltaBitCount =
      (binaryShiftByteCount == 0 || binaryShiftByteCount == 31) ? 18 :
      (binaryShiftByteCount == 62) ? 9 : 8;
    State result = new State(token, mode, binaryShiftByteCount + 1, bitCount + deltaBitCount);
    if (result.binaryShiftByteCount == 2047 + 31) {
      // The string is as long as it's allowed to be.  We should end it.
      result = result.endBinaryShift(index + 1);
    }
    return result;
  }

  // Create the state identical to this one, but we are no longer in
  // Binary Shift mode.
  State endBinaryShift(int index) {
    if (binaryShiftByteCount == 0) {
      return this;
    }
    Token token = this.token;
    token = token.addBinaryShift(index - binaryShiftByteCount, binaryShiftByteCount);
    //assert token.getTotalBitCount() == this.bitCount;
    return new State(token, mode, 0, this.bitCount);
  }

  // Returns true if "this" state is better (or equal) to be in than "that"
  // state under all possible circumstances.
  boolean isBetterThanOrEqualTo(State other) {
    int newModeBitCount = this.bitCount + (HighLevelEncoder.LATCH_TABLE[this.mode][other.mode] >> 16);
    if (this.binaryShiftByteCount < other.binaryShiftByteCount) {
      // add additional B/S encoding cost of other, if any
      newModeBitCount += calculateBinaryShiftCost(other) - calculateBinaryShiftCost(this);
    } else if (this.binaryShiftByteCount > other.binaryShiftByteCount && other.binaryShiftByteCount > 0) {
      // maximum possible additional cost (we end up exceeding the 31 byte boundary and other state can stay beneath it)
      newModeBitCount += 10; 
    }
    return newModeBitCount <= other.bitCount;
  }

  BitArray toBitArray(byte[] text) {
    // Reverse the tokens, so that they are in the order that they should
    // be output
    Deque<Token> symbols = new LinkedList<>();
    for (Token token = endBinaryShift(text.length).token; token != null; token = token.getPrevious()) {
      symbols.addFirst(token);
    }
    BitArray bitArray = new BitArray();
    // Add each token to the result.
    for (Token symbol : symbols) {
      symbol.appendTo(bitArray, text);
    }
    //assert bitArray.getSize() == this.bitCount;
    return bitArray;
  }

  @Override
  public String toString() {
    return String.format("%s bits=%d bytes=%d", HighLevelEncoder.MODE_NAMES[mode], bitCount, binaryShiftByteCount);
  }
  
  private static int calculateBinaryShiftCost(State state) {
    if (state.binaryShiftByteCount > 62) {
      return 21; // B/S with extended length
    }
    if (state.binaryShiftByteCount > 31) {
      return 20; // two B/S
    }
    if (state.binaryShiftByteCount > 0) {
      return 10; // one B/S
    }
    return 0;
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/Token.java
================================================
/*
 * Copyright 2013 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.aztec.encoder;

import com.google.zxing.common.BitArray;

abstract class Token {

  static final Token EMPTY = new SimpleToken(null, 0, 0);

  private final Token previous;

  Token(Token previous) {
    this.previous = previous;
  }

  final Token getPrevious() {
    return previous;
  }

  final Token add(int value, int bitCount) {
    return new SimpleToken(this, value, bitCount);
   }

  final Token addBinaryShift(int start, int byteCount) {
    //int bitCount = (byteCount * 8) + (byteCount <= 31 ? 10 : byteCount <= 62 ? 20 : 21);
    return new BinaryShiftToken(this, start, byteCount);
  }

  abstract void appendTo(BitArray bitArray, byte[] text);

}


================================================
FILE: scanner/src/main/java/com/google/zxing/client/result/AbstractDoCoMoResultParser.java
================================================
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.client.result;

/**
 * <p>See
 * <a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/about/s2.html">
 * DoCoMo's documentation</a> about the result types represented by subclasses of this class.</p>
 *
 * <p>Thanks to Jeff Griffin for proposing rewrite of these classes that relies less
 * on exception-based mechanisms during parsing.</p>
 *
 * @author Sean Owen
 */
abstract class AbstractDoCoMoResultParser extends ResultParser {

  static String[] matchDoCoMoPrefixedField(String prefix, String rawText, boolean trim) {
    return matchPrefixedField(prefix, rawText, ';', trim);
  }

  static String matchSingleDoCoMoPrefixedField(String prefix, String rawText, boolean trim) {
    return matchSinglePrefixedField(prefix, rawText, ';', trim);
  }

}


================================================
FILE: scanner/src/main/java/com/google/zxing/client/result/AddressBookAUResultParser.java
================================================
/*
 * Copyright 2008 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.zxing.client.result;

import com.google.zxing.Result;

import java.util.ArrayList;
import java.util.List;

/**
 * Implements KDDI AU's address book format. See
 * <a href="http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html">
 * http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html</a>.
 * (Thanks to Yuzo for translating!)
 *
 * @author Sean Owen
 */
public final class AddressBookAUResultParser extends ResultParser {

  @Override
  public AddressBookParsedResult parse(Result result) {
    String rawText = getMassagedText(result);
    // MEMORY is mandatory; seems like a decent indicator, as does end-of-record separator CR/LF
    if (!rawText.contains("MEMORY") || !rawText.contains("\r\n")) {
      return null;
    }

    // NAME1 and NAME2 have specific uses, namely written name and pronunciation, respectively.
    // Therefore we treat them specially instead of as an array of names.
    String name = matchSinglePrefixedField("NAME1:", rawText, '\r', true);
    String pronunciation = matchSinglePrefixedField("NAME2:", rawText, '\r', true);

    String[] phoneNumbers = matchMultipleValuePrefix("TEL", 3, rawText, true);
    String[] emails = matchMultipleValuePrefix("MAIL", 3, rawText, true);
    String note = matchSinglePrefixedField("MEMORY:", rawText, '\r', false);
    String address = matchSinglePrefixedField("ADD:", rawText, '\r', true);
    String[] addresses = address == null ? null : new String[] {address};
    return new AddressBookParsedResult(maybeWrap(name),
                                       null,
                                       pronunciation,
                                       phoneNumbers,
                                       null,
                                       emails,
                                       null,
                                       null,
                                       note,
                                       addresses,
                                       null,
                                       null,
                                       null,
                                       null,
                                       null,
                                       null);
  }

  private static String[] matchMultipleValuePrefix(String prefix,
                                                   int max,
                                                   String rawText,
                                                   boolean trim) {
    List<String> values = null;
    for (int i = 1; i <= max; i++) {
      String value = matchSinglePrefixedField(prefix + i + ':', rawText, '\r', trim);
   
Download .txt
gitextract_tggjnmmr/

├── .gitignore
├── .idea/
│   ├── codeStyles/
│   │   └── Project.xml
│   ├── gradle.xml
│   ├── misc.xml
│   ├── runConfigurations.xml
│   └── vcs.xml
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── nanchen/
│       │               └── aiyascanner/
│       │                   └── ExampleInstrumentedTest.java
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── nanchen/
│       │   │           └── aiyascanner/
│       │   │               └── MainActivity.java
│       │   └── res/
│       │       ├── drawable/
│       │       │   └── ic_launcher_background.xml
│       │       ├── drawable-v24/
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── layout/
│       │       │   └── activity_main.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       └── values/
│       │           ├── colors.xml
│       │           ├── dimens.xml
│       │           ├── strings.xml
│       │           └── styles.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── nanchen/
│                       └── aiyascanner/
│                           └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── scanner/
│   ├── .gitignore
│   ├── build.gradle
│   ├── libs/
│   │   └── zbar-1.0.0.jar
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       ├── google/
│           │       │   └── zxing/
│           │       │       ├── BarcodeFormat.java
│           │       │       ├── Binarizer.java
│           │       │       ├── BinaryBitmap.java
│           │       │       ├── ChecksumException.java
│           │       │       ├── DecodeHintType.java
│           │       │       ├── Dimension.java
│           │       │       ├── EncodeHintType.java
│           │       │       ├── FormatException.java
│           │       │       ├── InvertedLuminanceSource.java
│           │       │       ├── LuminanceSource.java
│           │       │       ├── MultiFormatReader.java
│           │       │       ├── MultiFormatWriter.java
│           │       │       ├── NotFoundException.java
│           │       │       ├── PlanarYUVLuminanceSource.java
│           │       │       ├── RGBLuminanceSource.java
│           │       │       ├── Reader.java
│           │       │       ├── ReaderException.java
│           │       │       ├── Result.java
│           │       │       ├── ResultMetadataType.java
│           │       │       ├── ResultPoint.java
│           │       │       ├── ResultPointCallback.java
│           │       │       ├── Writer.java
│           │       │       ├── WriterException.java
│           │       │       ├── aztec/
│           │       │       │   ├── AztecDetectorResult.java
│           │       │       │   ├── AztecReader.java
│           │       │       │   ├── AztecWriter.java
│           │       │       │   ├── decoder/
│           │       │       │   │   └── Decoder.java
│           │       │       │   ├── detector/
│           │       │       │   │   └── Detector.java
│           │       │       │   └── encoder/
│           │       │       │       ├── AztecCode.java
│           │       │       │       ├── BinaryShiftToken.java
│           │       │       │       ├── Encoder.java
│           │       │       │       ├── HighLevelEncoder.java
│           │       │       │       ├── SimpleToken.java
│           │       │       │       ├── State.java
│           │       │       │       └── Token.java
│           │       │       ├── client/
│           │       │       │   └── result/
│           │       │       │       ├── AbstractDoCoMoResultParser.java
│           │       │       │       ├── AddressBookAUResultParser.java
│           │       │       │       ├── AddressBookDoCoMoResultParser.java
│           │       │       │       ├── AddressBookParsedResult.java
│           │       │       │       ├── BizcardResultParser.java
│           │       │       │       ├── BookmarkDoCoMoResultParser.java
│           │       │       │       ├── CalendarParsedResult.java
│           │       │       │       ├── EmailAddressParsedResult.java
│           │       │       │       ├── EmailAddressResultParser.java
│           │       │       │       ├── EmailDoCoMoResultParser.java
│           │       │       │       ├── ExpandedProductParsedResult.java
│           │       │       │       ├── ExpandedProductResultParser.java
│           │       │       │       ├── GeoParsedResult.java
│           │       │       │       ├── GeoResultParser.java
│           │       │       │       ├── ISBNParsedResult.java
│           │       │       │       ├── ISBNResultParser.java
│           │       │       │       ├── ParsedResult.java
│           │       │       │       ├── ParsedResultType.java
│           │       │       │       ├── ProductParsedResult.java
│           │       │       │       ├── ProductResultParser.java
│           │       │       │       ├── ResultParser.java
│           │       │       │       ├── SMSMMSResultParser.java
│           │       │       │       ├── SMSParsedResult.java
│           │       │       │       ├── SMSTOMMSTOResultParser.java
│           │       │       │       ├── SMTPResultParser.java
│           │       │       │       ├── TelParsedResult.java
│           │       │       │       ├── TelResultParser.java
│           │       │       │       ├── TextParsedResult.java
│           │       │       │       ├── URIParsedResult.java
│           │       │       │       ├── URIResultParser.java
│           │       │       │       ├── URLTOResultParser.java
│           │       │       │       ├── VCardResultParser.java
│           │       │       │       ├── VEventResultParser.java
│           │       │       │       ├── VINParsedResult.java
│           │       │       │       ├── VINResultParser.java
│           │       │       │       ├── WifiParsedResult.java
│           │       │       │       └── WifiResultParser.java
│           │       │       ├── common/
│           │       │       │   ├── BitArray.java
│           │       │       │   ├── BitMatrix.java
│           │       │       │   ├── BitSource.java
│           │       │       │   ├── CharacterSetECI.java
│           │       │       │   ├── DecoderResult.java
│           │       │       │   ├── DefaultGridSampler.java
│           │       │       │   ├── DetectorResult.java
│           │       │       │   ├── GlobalHistogramBinarizer.java
│           │       │       │   ├── GridSampler.java
│           │       │       │   ├── HybridBinarizer.java
│           │       │       │   ├── PerspectiveTransform.java
│           │       │       │   ├── StringUtils.java
│           │       │       │   ├── detector/
│           │       │       │   │   ├── MathUtils.java
│           │       │       │   │   ├── MonochromeRectangleDetector.java
│           │       │       │   │   └── WhiteRectangleDetector.java
│           │       │       │   └── reedsolomon/
│           │       │       │       ├── GenericGF.java
│           │       │       │       ├── GenericGFPoly.java
│           │       │       │       ├── ReedSolomonDecoder.java
│           │       │       │       ├── ReedSolomonEncoder.java
│           │       │       │       └── ReedSolomonException.java
│           │       │       ├── datamatrix/
│           │       │       │   ├── DataMatrixReader.java
│           │       │       │   ├── DataMatrixWriter.java
│           │       │       │   ├── decoder/
│           │       │       │   │   ├── BitMatrixParser.java
│           │       │       │   │   ├── DataBlock.java
│           │       │       │   │   ├── DecodedBitStreamParser.java
│           │       │       │   │   ├── Decoder.java
│           │       │       │   │   └── Version.java
│           │       │       │   ├── detector/
│           │       │       │   │   └── Detector.java
│           │       │       │   └── encoder/
│           │       │       │       ├── ASCIIEncoder.java
│           │       │       │       ├── Base256Encoder.java
│           │       │       │       ├── C40Encoder.java
│           │       │       │       ├── DataMatrixSymbolInfo144.java
│           │       │       │       ├── DefaultPlacement.java
│           │       │       │       ├── EdifactEncoder.java
│           │       │       │       ├── Encoder.java
│           │       │       │       ├── EncoderContext.java
│           │       │       │       ├── ErrorCorrection.java
│           │       │       │       ├── HighLevelEncoder.java
│           │       │       │       ├── SymbolInfo.java
│           │       │       │       ├── SymbolShapeHint.java
│           │       │       │       ├── TextEncoder.java
│           │       │       │       └── X12Encoder.java
│           │       │       ├── maxicode/
│           │       │       │   ├── MaxiCodeReader.java
│           │       │       │   └── decoder/
│           │       │       │       ├── BitMatrixParser.java
│           │       │       │       ├── DecodedBitStreamParser.java
│           │       │       │       └── Decoder.java
│           │       │       ├── multi/
│           │       │       │   ├── ByQuadrantReader.java
│           │       │       │   ├── GenericMultipleBarcodeReader.java
│           │       │       │   ├── MultipleBarcodeReader.java
│           │       │       │   └── qrcode/
│           │       │       │       ├── QRCodeMultiReader.java
│           │       │       │       └── detector/
│           │       │       │           ├── MultiDetector.java
│           │       │       │           └── MultiFinderPatternFinder.java
│           │       │       ├── oned/
│           │       │       │   ├── CodaBarReader.java
│           │       │       │   ├── CodaBarWriter.java
│           │       │       │   ├── Code128Reader.java
│           │       │       │   ├── Code128Writer.java
│           │       │       │   ├── Code39Reader.java
│           │       │       │   ├── Code39Writer.java
│           │       │       │   ├── Code93Reader.java
│           │       │       │   ├── Code93Writer.java
│           │       │       │   ├── EAN13Reader.java
│           │       │       │   ├── EAN13Writer.java
│           │       │       │   ├── EAN8Reader.java
│           │       │       │   ├── EAN8Writer.java
│           │       │       │   ├── EANManufacturerOrgSupport.java
│           │       │       │   ├── ITFReader.java
│           │       │       │   ├── ITFWriter.java
│           │       │       │   ├── MultiFormatOneDReader.java
│           │       │       │   ├── MultiFormatUPCEANReader.java
│           │       │       │   ├── OneDReader.java
│           │       │       │   ├── OneDimensionalCodeWriter.java
│           │       │       │   ├── UPCAReader.java
│           │       │       │   ├── UPCAWriter.java
│           │       │       │   ├── UPCEANExtension2Support.java
│           │       │       │   ├── UPCEANExtension5Support.java
│           │       │       │   ├── UPCEANExtensionSupport.java
│           │       │       │   ├── UPCEANReader.java
│           │       │       │   ├── UPCEANWriter.java
│           │       │       │   ├── UPCEReader.java
│           │       │       │   ├── UPCEWriter.java
│           │       │       │   └── rss/
│           │       │       │       ├── AbstractRSSReader.java
│           │       │       │       ├── DataCharacter.java
│           │       │       │       ├── FinderPattern.java
│           │       │       │       ├── Pair.java
│           │       │       │       ├── RSS14Reader.java
│           │       │       │       ├── RSSUtils.java
│           │       │       │       └── expanded/
│           │       │       │           ├── BitArrayBuilder.java
│           │       │       │           ├── ExpandedPair.java
│           │       │       │           ├── ExpandedRow.java
│           │       │       │           ├── RSSExpandedReader.java
│           │       │       │           └── decoders/
│           │       │       │               ├── AI013103decoder.java
│           │       │       │               ├── AI01320xDecoder.java
│           │       │       │               ├── AI01392xDecoder.java
│           │       │       │               ├── AI01393xDecoder.java
│           │       │       │               ├── AI013x0x1xDecoder.java
│           │       │       │               ├── AI013x0xDecoder.java
│           │       │       │               ├── AI01AndOtherAIs.java
│           │       │       │               ├── AI01decoder.java
│           │       │       │               ├── AI01weightDecoder.java
│           │       │       │               ├── AbstractExpandedDecoder.java
│           │       │       │               ├── AnyAIDecoder.java
│           │       │       │               ├── BlockParsedResult.java
│           │       │       │               ├── CurrentParsingState.java
│           │       │       │               ├── DecodedChar.java
│           │       │       │               ├── DecodedInformation.java
│           │       │       │               ├── DecodedNumeric.java
│           │       │       │               ├── DecodedObject.java
│           │       │       │               ├── FieldParser.java
│           │       │       │               └── GeneralAppIdDecoder.java
│           │       │       ├── pdf417/
│           │       │       │   ├── PDF417Common.java
│           │       │       │   ├── PDF417Reader.java
│           │       │       │   ├── PDF417ResultMetadata.java
│           │       │       │   ├── PDF417Writer.java
│           │       │       │   ├── decoder/
│           │       │       │   │   ├── BarcodeMetadata.java
│           │       │       │   │   ├── BarcodeValue.java
│           │       │       │   │   ├── BoundingBox.java
│           │       │       │   │   ├── Codeword.java
│           │       │       │   │   ├── DecodedBitStreamParser.java
│           │       │       │   │   ├── DetectionResult.java
│           │       │       │   │   ├── DetectionResultColumn.java
│           │       │       │   │   ├── DetectionResultRowIndicatorColumn.java
│           │       │       │   │   ├── PDF417CodewordDecoder.java
│           │       │       │   │   ├── PDF417ScanningDecoder.java
│           │       │       │   │   └── ec/
│           │       │       │   │       ├── ErrorCorrection.java
│           │       │       │   │       ├── ModulusGF.java
│           │       │       │   │       └── ModulusPoly.java
│           │       │       │   ├── detector/
│           │       │       │   │   ├── Detector.java
│           │       │       │   │   └── PDF417DetectorResult.java
│           │       │       │   └── encoder/
│           │       │       │       ├── BarcodeMatrix.java
│           │       │       │       ├── BarcodeRow.java
│           │       │       │       ├── Compaction.java
│           │       │       │       ├── Dimensions.java
│           │       │       │       ├── PDF417.java
│           │       │       │       ├── PDF417ErrorCorrection.java
│           │       │       │       └── PDF417HighLevelEncoder.java
│           │       │       └── qrcode/
│           │       │           ├── QRCodeReader.java
│           │       │           ├── QRCodeWriter.java
│           │       │           ├── decoder/
│           │       │           │   ├── BitMatrixParser.java
│           │       │           │   ├── DataBlock.java
│           │       │           │   ├── DataMask.java
│           │       │           │   ├── DecodedBitStreamParser.java
│           │       │           │   ├── Decoder.java
│           │       │           │   ├── ErrorCorrectionLevel.java
│           │       │           │   ├── FormatInformation.java
│           │       │           │   ├── Mode.java
│           │       │           │   ├── QRCodeDecoderMetaData.java
│           │       │           │   └── Version.java
│           │       │           ├── detector/
│           │       │           │   ├── AlignmentPattern.java
│           │       │           │   ├── AlignmentPatternFinder.java
│           │       │           │   ├── Detector.java
│           │       │           │   ├── FinderPattern.java
│           │       │           │   ├── FinderPatternFinder.java
│           │       │           │   └── FinderPatternInfo.java
│           │       │           └── encoder/
│           │       │               ├── BlockPair.java
│           │       │               ├── ByteMatrix.java
│           │       │               ├── Encoder.java
│           │       │               ├── MaskUtil.java
│           │       │               ├── MatrixUtil.java
│           │       │               └── QRCode.java
│           │       └── nanchen/
│           │           └── scanner/
│           │               ├── module/
│           │               │   └── CaptureActivity.java
│           │               ├── utils/
│           │               │   ├── PermissionConstants.java
│           │               │   ├── PermissionUtils.java
│           │               │   ├── QRUtils.java
│           │               │   └── ScreenUtils.java
│           │               └── zxing/
│           │                   ├── AmbientLightManager.java
│           │                   ├── BaseCaptureActivity.java
│           │                   ├── BeepManager.java
│           │                   ├── CaptureActivityHandler.java
│           │                   ├── Contents.java
│           │                   ├── DecodeFormatManager.java
│           │                   ├── DecodeHandler.java
│           │                   ├── DecodeHintManager.java
│           │                   ├── DecodeThread.java
│           │                   ├── FinishListener.java
│           │                   ├── InactivityTimer.java
│           │                   ├── Intents.java
│           │                   ├── ViewfinderResultPointCallback.java
│           │                   ├── ViewfinderView.java
│           │                   └── camera/
│           │                       ├── AutoFocusManager.java
│           │                       ├── CameraConfigurationManager.java
│           │                       ├── CameraConfigurationUtils.java
│           │                       ├── CameraManager.java
│           │                       ├── FrontLightMode.java
│           │                       ├── PreviewCallback.java
│           │                       └── open/
│           │                           ├── CameraFacing.java
│           │                           ├── OpenCamera.java
│           │                           └── OpenCameraInterface.java
│           └── res/
│               ├── color/
│               │   └── dialog_pro_color.xml
│               ├── drawable/
│               │   └── shape_dialog_bg.xml
│               ├── layout/
│               │   ├── activity_capture.xml
│               │   └── dialog_loading.xml
│               ├── raw/
│               │   └── beep.ogg
│               ├── values/
│               │   ├── colors.xml
│               │   ├── dimens.xml
│               │   ├── ids.xml
│               │   ├── strings.xml
│               │   └── styles.xml
│               ├── values-ja/
│               │   └── strings.xml
│               └── xml/
│                   └── preferences.xml
└── settings.gradle
Download .txt
SYMBOL INDEX (2074 symbols across 262 files)

FILE: app/src/androidTest/java/com/nanchen/aiyascanner/ExampleInstrumentedTest.java
  class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
    method useAppContext (line 19) | @Test

FILE: app/src/main/java/com/nanchen/aiyascanner/MainActivity.java
  class MainActivity (line 14) | public class MainActivity extends AppCompatActivity {
    method onCreate (line 16) | @Override
    method onActivityResult (line 30) | @Override

FILE: app/src/test/java/com/nanchen/aiyascanner/ExampleUnitTest.java
  class ExampleUnitTest (line 12) | public class ExampleUnitTest {
    method addition_isCorrect (line 13) | @Test

FILE: scanner/src/main/java/com/google/zxing/BarcodeFormat.java
  type BarcodeFormat (line 24) | public enum BarcodeFormat {

FILE: scanner/src/main/java/com/google/zxing/Binarizer.java
  class Binarizer (line 30) | public abstract class Binarizer {
    method Binarizer (line 34) | protected Binarizer(LuminanceSource source) {
    method getLuminanceSource (line 38) | public final LuminanceSource getLuminanceSource() {
    method getBlackRow (line 56) | public abstract BitArray getBlackRow(int y, BitArray row) throws NotFo...
    method getBlackMatrix (line 67) | public abstract BitMatrix getBlackMatrix() throws NotFoundException;
    method createBinarizer (line 77) | public abstract Binarizer createBinarizer(LuminanceSource source);
    method getWidth (line 79) | public final int getWidth() {
    method getHeight (line 83) | public final int getHeight() {

FILE: scanner/src/main/java/com/google/zxing/BinaryBitmap.java
  class BinaryBitmap (line 28) | public final class BinaryBitmap {
    method BinaryBitmap (line 33) | public BinaryBitmap(Binarizer binarizer) {
    method getWidth (line 43) | public int getWidth() {
    method getHeight (line 50) | public int getHeight() {
    method getBlackRow (line 65) | public BitArray getBlackRow(int y, BitArray row) throws NotFoundExcept...
    method getBlackMatrix (line 78) | public BitMatrix getBlackMatrix() throws NotFoundException {
    method isCropSupported (line 93) | public boolean isCropSupported() {
    method crop (line 107) | public BinaryBitmap crop(int left, int top, int width, int height) {
    method isRotateSupported (line 115) | public boolean isRotateSupported() {
    method rotateCounterClockwise (line 125) | public BinaryBitmap rotateCounterClockwise() {
    method rotateCounterClockwise45 (line 136) | public BinaryBitmap rotateCounterClockwise45() {
    method toString (line 141) | @Override

FILE: scanner/src/main/java/com/google/zxing/ChecksumException.java
  class ChecksumException (line 25) | public final class ChecksumException extends ReaderException {
    method ChecksumException (line 32) | private ChecksumException() {
    method ChecksumException (line 36) | private ChecksumException(Throwable cause) {
    method getChecksumInstance (line 40) | public static ChecksumException getChecksumInstance() {
    method getChecksumInstance (line 44) | public static ChecksumException getChecksumInstance(Throwable cause) {

FILE: scanner/src/main/java/com/google/zxing/DecodeHintType.java
  type DecodeHintType (line 30) | public enum DecodeHintType {
    method DecodeHintType (line 114) | DecodeHintType(Class<?> valueType) {
    method getValueType (line 118) | public Class<?> getValueType() {

FILE: scanner/src/main/java/com/google/zxing/Dimension.java
  class Dimension (line 22) | public final class Dimension {
    method Dimension (line 27) | public Dimension(int width, int height) {
    method getWidth (line 35) | public int getWidth() {
    method getHeight (line 39) | public int getHeight() {
    method equals (line 43) | @Override
    method hashCode (line 52) | @Override
    method toString (line 57) | @Override

FILE: scanner/src/main/java/com/google/zxing/EncodeHintType.java
  type EncodeHintType (line 24) | public enum EncodeHintType {

FILE: scanner/src/main/java/com/google/zxing/FormatException.java
  class FormatException (line 26) | public final class FormatException extends ReaderException {
    method FormatException (line 33) | private FormatException() {
    method FormatException (line 36) | private FormatException(Throwable cause) {
    method getFormatInstance (line 40) | public static FormatException getFormatInstance() {
    method getFormatInstance (line 44) | public static FormatException getFormatInstance(Throwable cause) {

FILE: scanner/src/main/java/com/google/zxing/InvertedLuminanceSource.java
  class InvertedLuminanceSource (line 25) | public final class InvertedLuminanceSource extends LuminanceSource {
    method InvertedLuminanceSource (line 29) | public InvertedLuminanceSource(LuminanceSource delegate) {
    method getRow (line 34) | @Override
    method getMatrix (line 44) | @Override
    method isCropSupported (line 55) | @Override
    method crop (line 60) | @Override
    method isRotateSupported (line 65) | @Override
    method invert (line 73) | @Override
    method rotateCounterClockwise (line 78) | @Override
    method rotateCounterClockwise45 (line 83) | @Override

FILE: scanner/src/main/java/com/google/zxing/LuminanceSource.java
  class LuminanceSource (line 28) | public abstract class LuminanceSource {
    method LuminanceSource (line 33) | protected LuminanceSource(int width, int height) {
    method getRow (line 50) | public abstract byte[] getRow(int y, byte[] row);
    method getMatrix (line 60) | public abstract byte[] getMatrix();
    method getWidth (line 65) | public final int getWidth() {
    method getHeight (line 72) | public final int getHeight() {
    method isCropSupported (line 79) | public boolean isCropSupported() {
    method crop (line 93) | public LuminanceSource crop(int left, int top, int width, int height) {
    method isRotateSupported (line 100) | public boolean isRotateSupported() {
    method invert (line 108) | public LuminanceSource invert() {
    method rotateCounterClockwise (line 118) | public LuminanceSource rotateCounterClockwise() {
    method rotateCounterClockwise45 (line 128) | public LuminanceSource rotateCounterClockwise45() {
    method toString (line 132) | @Override

FILE: scanner/src/main/java/com/google/zxing/MultiFormatReader.java
  class MultiFormatReader (line 38) | public final class MultiFormatReader implements Reader {
    method decode (line 54) | @Override
    method decode (line 68) | @Override
    method decodeWithState (line 82) | public Result decodeWithState(BinaryBitmap image) throws NotFoundExcep...
    method setHints (line 97) | public void setHints(Map<DecodeHintType,?> hints) {
    method reset (line 160) | @Override
    method decodeInternal (line 169) | private Result decodeInternal(BinaryBitmap image) throws NotFoundExcep...

FILE: scanner/src/main/java/com/google/zxing/MultiFormatWriter.java
  class MultiFormatWriter (line 42) | public final class MultiFormatWriter implements Writer {
    method encode (line 44) | @Override
    method encode (line 52) | @Override

FILE: scanner/src/main/java/com/google/zxing/NotFoundException.java
  class NotFoundException (line 25) | public final class NotFoundException extends ReaderException {
    method NotFoundException (line 32) | private NotFoundException() {
    method getNotFoundInstance (line 36) | public static NotFoundException getNotFoundInstance() {

FILE: scanner/src/main/java/com/google/zxing/PlanarYUVLuminanceSource.java
  class PlanarYUVLuminanceSource (line 29) | public final class PlanarYUVLuminanceSource extends LuminanceSource {
    method PlanarYUVLuminanceSource (line 39) | public PlanarYUVLuminanceSource(byte[] yuvData,
    method getRow (line 63) | @Override
    method getMatrix (line 77) | @Override
    method isCropSupported (line 107) | @Override
    method crop (line 112) | @Override
    method renderThumbnail (line 124) | public int[] renderThumbnail() {
    method getThumbnailWidth (line 145) | public int getThumbnailWidth() {
    method getThumbnailHeight (line 152) | public int getThumbnailHeight() {
    method reverseHorizontal (line 156) | private void reverseHorizontal(int width, int height) {

FILE: scanner/src/main/java/com/google/zxing/RGBLuminanceSource.java
  class RGBLuminanceSource (line 26) | public final class RGBLuminanceSource extends LuminanceSource {
    method RGBLuminanceSource (line 34) | public RGBLuminanceSource(int width, int height, int[] pixels) {
    method RGBLuminanceSource (line 58) | private RGBLuminanceSource(byte[] pixels,
    method getRow (line 76) | @Override
    method getMatrix (line 90) | @Override
    method isCropSupported (line 120) | @Override
    method crop (line 125) | @Override

FILE: scanner/src/main/java/com/google/zxing/Reader.java
  type Reader (line 33) | public interface Reader {
    method decode (line 44) | Result decode(BinaryBitmap image) throws NotFoundException, ChecksumEx...
    method decode (line 60) | Result decode(BinaryBitmap image, Map<DecodeHintType, ?> hints)
    method reset (line 67) | void reset();

FILE: scanner/src/main/java/com/google/zxing/ReaderException.java
  class ReaderException (line 26) | public abstract class ReaderException extends Exception {
    method ReaderException (line 33) | ReaderException() {
    method ReaderException (line 37) | ReaderException(Throwable cause) {
    method fillInStackTrace (line 42) | @Override

FILE: scanner/src/main/java/com/google/zxing/Result.java
  class Result (line 27) | public final class Result {
    method Result (line 37) | public Result(String text,
    method Result (line 44) | public Result(String text,
    method Result (line 53) | public Result(String text,
    method getText (line 71) | public String getText() {
    method getRawBytes (line 78) | public byte[] getRawBytes() {
    method getNumBits (line 86) | public int getNumBits() {
    method getResultPoints (line 95) | public ResultPoint[] getResultPoints() {
    method getBarcodeFormat (line 102) | public BarcodeFormat getBarcodeFormat() {
    method getResultMetadata (line 111) | public Map<ResultMetadataType,Object> getResultMetadata() {
    method putMetadata (line 115) | public void putMetadata(ResultMetadataType type, Object value) {
    method putAllMetadata (line 122) | public void putAllMetadata(Map<ResultMetadataType,Object> metadata) {
    method addResultPoints (line 132) | public void addResultPoints(ResultPoint[] newPoints) {
    method getTimestamp (line 144) | public long getTimestamp() {
    method toString (line 148) | @Override

FILE: scanner/src/main/java/com/google/zxing/ResultMetadataType.java
  type ResultMetadataType (line 25) | public enum ResultMetadataType {

FILE: scanner/src/main/java/com/google/zxing/ResultPoint.java
  class ResultPoint (line 27) | public class ResultPoint {
    method ResultPoint (line 32) | public ResultPoint(float x, float y) {
    method getX (line 37) | public final float getX() {
    method getY (line 41) | public final float getY() {
    method equals (line 45) | @Override
    method hashCode (line 54) | @Override
    method toString (line 59) | @Override
    method orderBestPatterns (line 70) | public static void orderBestPatterns(ResultPoint[] patterns) {
    method distance (line 115) | public static float distance(ResultPoint pattern1, ResultPoint pattern...
    method crossProductZ (line 122) | private static float crossProductZ(ResultPoint pointA,

FILE: scanner/src/main/java/com/google/zxing/ResultPointCallback.java
  type ResultPointCallback (line 25) | public interface ResultPointCallback {
    method foundPossibleResultPoint (line 27) | void foundPossibleResultPoint(ResultPoint point);

FILE: scanner/src/main/java/com/google/zxing/Writer.java
  type Writer (line 28) | public interface Writer {
    method encode (line 40) | BitMatrix encode(String contents, BarcodeFormat format, int width, int...
    method encode (line 52) | BitMatrix encode(String contents,

FILE: scanner/src/main/java/com/google/zxing/WriterException.java
  class WriterException (line 25) | public final class WriterException extends Exception {
    method WriterException (line 27) | public WriterException() {
    method WriterException (line 30) | public WriterException(String message) {
    method WriterException (line 34) | public WriterException(Throwable cause) {

FILE: scanner/src/main/java/com/google/zxing/aztec/AztecDetectorResult.java
  class AztecDetectorResult (line 29) | public final class AztecDetectorResult extends DetectorResult {
    method AztecDetectorResult (line 35) | public AztecDetectorResult(BitMatrix bits,
    method getNbLayers (line 46) | public int getNbLayers() {
    method getNbDatablocks (line 50) | public int getNbDatablocks() {
    method isCompact (line 54) | public boolean isCompact() {

FILE: scanner/src/main/java/com/google/zxing/aztec/AztecReader.java
  class AztecReader (line 41) | public final class AztecReader implements Reader {
    method decode (line 50) | @Override
    method decode (line 55) | @Override
    method reset (line 117) | @Override

FILE: scanner/src/main/java/com/google/zxing/aztec/AztecWriter.java
  class AztecWriter (line 33) | public final class AztecWriter implements Writer {
    method encode (line 35) | @Override
    method encode (line 40) | @Override
    method encode (line 59) | private static BitMatrix encode(String contents, BarcodeFormat format,
    method renderResult (line 69) | private static BitMatrix renderResult(AztecCode code, int width, int h...

FILE: scanner/src/main/java/com/google/zxing/aztec/decoder/Decoder.java
  class Decoder (line 35) | public final class Decoder {
    type Table (line 37) | private enum Table {
    method decode (line 73) | public DecoderResult decode(AztecDetectorResult detectorResult) throws...
    method highLevelDecode (line 86) | public static String highLevelDecode(boolean[] correctedBits) {
    method getEncodedData (line 95) | private static String getEncodedData(boolean[] correctedBits) {
    method getTable (line 157) | private static Table getTable(char t) {
    method getCharacter (line 181) | private static String getCharacter(Table table, int code) {
    method correctBits (line 205) | private boolean[] correctBits(boolean[] rawbits) throws FormatException {
    method extractBits (line 277) | private boolean[] extractBits(BitMatrix matrix) {
    method readCode (line 330) | private static int readCode(boolean[] rawbits, int startIndex, int len...
    method readByte (line 344) | private static byte readByte(boolean[] rawbits, int startIndex) {
    method convertBoolArrayToByteArray (line 355) | static byte[] convertBoolArrayToByteArray(boolean[] boolArr) {
    method totalBitsInLayer (line 363) | private static int totalBitsInLayer(int layers, boolean compact) {

FILE: scanner/src/main/java/com/google/zxing/aztec/detector/Detector.java
  class Detector (line 37) | public final class Detector {
    method Detector (line 54) | public Detector(BitMatrix image) {
    method detect (line 58) | public AztecDetectorResult detect() throws NotFoundException {
    method detect (line 69) | public AztecDetectorResult detect(boolean isMirror) throws NotFoundExc...
    method extractParameters (line 106) | private void extractParameters(ResultPoint[] bullsEyeCorners) throws N...
    method getRotation (line 156) | private static int getRotation(int[] sides, int length) throws NotFoun...
    method getCorrectedParameterData (line 194) | private static int getCorrectedParameterData(long parameterData, boole...
    method getBullsEyeCorners (line 235) | private ResultPoint[] getBullsEyeCorners(Point pCenter) throws NotFoun...
    method getMatrixCenter (line 294) | private Point getMatrixCenter() {
    method getMatrixCornerPoints (line 358) | private ResultPoint[] getMatrixCornerPoints(ResultPoint[] bullsEyeCorn...
    method sampleGrid (line 367) | private BitMatrix sampleGrid(BitMatrix image,
    method sampleLine (line 400) | private int sampleLine(ResultPoint p1, ResultPoint p2, int size) {
    method isWhiteOrBlackRectangle (line 421) | private boolean isWhiteOrBlackRectangle(Point p1,
    method getColor (line 462) | private int getColor(Point p1, Point p2) {
    method getFirstDifferent (line 494) | private Point getFirstDifferent(Point init, boolean color, int dx, int...
    method expandSquare (line 527) | private static ResultPoint[] expandSquare(ResultPoint[] cornerPoints, ...
    method isValid (line 547) | private boolean isValid(int x, int y) {
    method isValid (line 551) | private boolean isValid(ResultPoint point) {
    method distance (line 557) | private static float distance(Point a, Point b) {
    method distance (line 561) | private static float distance(ResultPoint a, ResultPoint b) {
    method getDimension (line 565) | private int getDimension() {
    class Point (line 575) | static final class Point {
      method toResultPoint (line 579) | ResultPoint toResultPoint() {
      method Point (line 583) | Point(int x, int y) {
      method getX (line 588) | int getX() {
      method getY (line 592) | int getY() {
      method toString (line 596) | @Override

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/AztecCode.java
  class AztecCode (line 26) | public final class AztecCode {
    method isCompact (line 37) | public boolean isCompact() {
    method setCompact (line 41) | public void setCompact(boolean compact) {
    method getSize (line 48) | public int getSize() {
    method setSize (line 52) | public void setSize(int size) {
    method getLayers (line 59) | public int getLayers() {
    method setLayers (line 63) | public void setLayers(int layers) {
    method getCodeWords (line 70) | public int getCodeWords() {
    method setCodeWords (line 74) | public void setCodeWords(int codeWords) {
    method getMatrix (line 81) | public BitMatrix getMatrix() {
    method setMatrix (line 85) | public void setMatrix(BitMatrix matrix) {

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/BinaryShiftToken.java
  class BinaryShiftToken (line 21) | final class BinaryShiftToken extends Token {
    method BinaryShiftToken (line 26) | BinaryShiftToken(Token previous,
    method appendTo (line 34) | @Override
    method toString (line 55) | @Override

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/Encoder.java
  class Encoder (line 29) | public final class Encoder {
    method Encoder (line 41) | private Encoder() {
    method encode (line 50) | public static AztecCode encode(byte[] data) {
    method encode (line 63) | public static AztecCode encode(byte[] data, int minECCPercent, int use...
    method drawBullsEye (line 203) | private static void drawBullsEye(BitMatrix matrix, int center, int siz...
    method generateModeMessage (line 220) | static BitArray generateModeMessage(boolean compact, int layers, int m...
    method drawModeMessage (line 234) | private static void drawModeMessage(BitMatrix matrix, boolean compact,...
    method generateCheckWords (line 271) | private static BitArray generateCheckWords(BitArray bitArray, int tota...
    method bitsToWords (line 287) | private static int[] bitsToWords(BitArray stuffedBits, int wordSize, i...
    method getGF (line 301) | private static GenericGF getGF(int wordSize) {
    method stuffBits (line 318) | static BitArray stuffBits(BitArray bits, int wordSize) {
    method totalBitsInLayer (line 343) | private static int totalBitsInLayer(int layers, boolean compact) {

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/HighLevelEncoder.java
  class HighLevelEncoder (line 40) | public final class HighLevelEncoder {
    method HighLevelEncoder (line 152) | public HighLevelEncoder(byte[] text) {
    method encode (line 159) | public BitArray encode() {
    method updateStateListForChar (line 204) | private Collection<State> updateStateListForChar(Iterable<State> state...
    method updateStateForChar (line 215) | private void updateStateForChar(State state, int index, Collection<Sta...
    method updateStateListForPair (line 253) | private static Collection<State> updateStateListForPair(Iterable<State...
    method updateStateForPair (line 261) | private static void updateStateForPair(State state, int index, int pai...
    method simplifyStates (line 285) | private static Collection<State> simplifyStates(Iterable<State> states) {

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/SimpleToken.java
  class SimpleToken (line 21) | final class SimpleToken extends Token {
    method SimpleToken (line 27) | SimpleToken(Token previous, int value, int bitCount) {
    method appendTo (line 33) | @Override
    method toString (line 38) | @Override

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/State.java
  class State (line 28) | final class State {
    method State (line 44) | private State(Token token, int mode, int binaryBytes, int bitCount) {
    method getMode (line 57) | int getMode() {
    method getToken (line 61) | Token getToken() {
    method getBinaryShiftByteCount (line 65) | int getBinaryShiftByteCount() {
    method getBitCount (line 69) | int getBitCount() {
    method latchAndAppend (line 75) | State latchAndAppend(int mode, int value) {
    method shiftAndAppend (line 91) | State shiftAndAppend(int mode, int value) {
    method addBinaryShiftChar (line 103) | State addBinaryShiftChar(int index) {
    method endBinaryShift (line 127) | State endBinaryShift(int index) {
    method isBetterThanOrEqualTo (line 139) | boolean isBetterThanOrEqualTo(State other) {
    method toBitArray (line 151) | BitArray toBitArray(byte[] text) {
    method toString (line 167) | @Override
    method calculateBinaryShiftCost (line 172) | private static int calculateBinaryShiftCost(State state) {

FILE: scanner/src/main/java/com/google/zxing/aztec/encoder/Token.java
  class Token (line 21) | abstract class Token {
    method Token (line 27) | Token(Token previous) {
    method getPrevious (line 31) | final Token getPrevious() {
    method add (line 35) | final Token add(int value, int bitCount) {
    method addBinaryShift (line 39) | final Token addBinaryShift(int start, int byteCount) {
    method appendTo (line 44) | abstract void appendTo(BitArray bitArray, byte[] text);

FILE: scanner/src/main/java/com/google/zxing/client/result/AbstractDoCoMoResultParser.java
  class AbstractDoCoMoResultParser (line 29) | abstract class AbstractDoCoMoResultParser extends ResultParser {
    method matchDoCoMoPrefixedField (line 31) | static String[] matchDoCoMoPrefixedField(String prefix, String rawText...
    method matchSingleDoCoMoPrefixedField (line 35) | static String matchSingleDoCoMoPrefixedField(String prefix, String raw...

FILE: scanner/src/main/java/com/google/zxing/client/result/AddressBookAUResultParser.java
  class AddressBookAUResultParser (line 32) | public final class AddressBookAUResultParser extends ResultParser {
    method parse (line 34) | @Override
    method matchMultipleValuePrefix (line 70) | private static String[] matchMultipleValuePrefix(String prefix,

FILE: scanner/src/main/java/com/google/zxing/client/result/AddressBookDoCoMoResultParser.java
  class AddressBookDoCoMoResultParser (line 36) | public final class AddressBookDoCoMoResultParser extends AbstractDoCoMoR...
    method parse (line 38) | @Override
    method parseName (line 83) | private static String parseName(String name) {

FILE: scanner/src/main/java/com/google/zxing/client/result/AddressBookParsedResult.java
  class AddressBookParsedResult (line 25) | public final class AddressBookParsedResult extends ParsedResult {
    method AddressBookParsedResult (line 44) | public AddressBookParsedResult(String[] names,
    method AddressBookParsedResult (line 69) | public AddressBookParsedResult(String[] names,
    method getNames (line 113) | public String[] getNames() {
    method getNicknames (line 117) | public String[] getNicknames() {
    method getPronunciation (line 127) | public String getPronunciation() {
    method getPhoneNumbers (line 131) | public String[] getPhoneNumbers() {
    method getPhoneTypes (line 139) | public String[] getPhoneTypes() {
    method getEmails (line 143) | public String[] getEmails() {
    method getEmailTypes (line 151) | public String[] getEmailTypes() {
    method getInstantMessenger (line 155) | public String getInstantMessenger() {
    method getNote (line 159) | public String getNote() {
    method getAddresses (line 163) | public String[] getAddresses() {
    method getAddressTypes (line 171) | public String[] getAddressTypes() {
    method getTitle (line 175) | public String getTitle() {
    method getOrg (line 179) | public String getOrg() {
    method getURLs (line 183) | public String[] getURLs() {
    method getBirthday (line 190) | public String getBirthday() {
    method getGeo (line 197) | public String[] getGeo() {
    method getDisplayResult (line 201) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/BizcardResultParser.java
  class BizcardResultParser (line 31) | public final class BizcardResultParser extends AbstractDoCoMoResultParser {
    method parse (line 37) | @Override
    method buildPhoneNumbers (line 72) | private static String[] buildPhoneNumbers(String number1,
    method buildName (line 92) | private static String buildName(String firstName, String lastName) {

FILE: scanner/src/main/java/com/google/zxing/client/result/BookmarkDoCoMoResultParser.java
  class BookmarkDoCoMoResultParser (line 24) | public final class BookmarkDoCoMoResultParser extends AbstractDoCoMoResu...
    method parse (line 26) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/CalendarParsedResult.java
  class CalendarParsedResult (line 36) | public final class CalendarParsedResult extends ParsedResult {
    method CalendarParsedResult (line 62) | public CalendarParsedResult(String summary,
    method getSummary (line 103) | public String getSummary() {
    method getStart (line 111) | @Deprecated
    method getStartTimestamp (line 120) | public long getStartTimestamp() {
    method isStartAllDay (line 127) | public boolean isStartAllDay() {
    method getEnd (line 135) | @Deprecated
    method getEndTimestamp (line 144) | public long getEndTimestamp() {
    method isEndAllDay (line 151) | public boolean isEndAllDay() {
    method getLocation (line 155) | public String getLocation() {
    method getOrganizer (line 159) | public String getOrganizer() {
    method getAttendees (line 163) | public String[] getAttendees() {
    method getDescription (line 167) | public String getDescription() {
    method getLatitude (line 171) | public double getLatitude() {
    method getLongitude (line 175) | public double getLongitude() {
    method getDisplayResult (line 179) | @Override
    method parseDate (line 199) | private static long parseDate(String when) throws ParseException {
    method format (line 226) | private static String format(boolean allDay, long date) {
    method parseDurationMS (line 236) | private static long parseDurationMS(CharSequence durationString) {
    method parseDateTimeString (line 254) | private static long parseDateTimeString(String dateTimeString) throws ...

FILE: scanner/src/main/java/com/google/zxing/client/result/EmailAddressParsedResult.java
  class EmailAddressParsedResult (line 25) | public final class EmailAddressParsedResult extends ParsedResult {
    method EmailAddressParsedResult (line 33) | EmailAddressParsedResult(String to) {
    method EmailAddressParsedResult (line 37) | EmailAddressParsedResult(String[] tos,
    method getEmailAddress (line 54) | @Deprecated
    method getTos (line 59) | public String[] getTos() {
    method getCCs (line 63) | public String[] getCCs() {
    method getBCCs (line 67) | public String[] getBCCs() {
    method getSubject (line 71) | public String getSubject() {
    method getBody (line 75) | public String getBody() {
    method getMailtoURI (line 83) | @Deprecated
    method getDisplayResult (line 88) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/EmailAddressResultParser.java
  class EmailAddressResultParser (line 30) | public final class EmailAddressResultParser extends ResultParser {
    method parse (line 34) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/EmailDoCoMoResultParser.java
  class EmailDoCoMoResultParser (line 30) | public final class EmailDoCoMoResultParser extends AbstractDoCoMoResultP...
    method parse (line 34) | @Override
    method isBasicallyValidEmailAddress (line 60) | static boolean isBasicallyValidEmailAddress(String email) {

FILE: scanner/src/main/java/com/google/zxing/client/result/ExpandedProductParsedResult.java
  class ExpandedProductParsedResult (line 38) | public final class ExpandedProductParsedResult extends ParsedResult {
    method ExpandedProductParsedResult (line 60) | public ExpandedProductParsedResult(String rawText,
    method equals (line 93) | @Override
    method equalsOrNull (line 116) | private static boolean equalsOrNull(Object o1, Object o2) {
    method hashCode (line 120) | @Override
    method hashNotNull (line 139) | private static int hashNotNull(Object o) {
    method getRawText (line 143) | public String getRawText() {
    method getProductID (line 147) | public String getProductID() {
    method getSscc (line 151) | public String getSscc() {
    method getLotNumber (line 155) | public String getLotNumber() {
    method getProductionDate (line 159) | public String getProductionDate() {
    method getPackagingDate (line 163) | public String getPackagingDate() {
    method getBestBeforeDate (line 167) | public String getBestBeforeDate() {
    method getExpirationDate (line 171) | public String getExpirationDate() {
    method getWeight (line 175) | public String getWeight() {
    method getWeightType (line 179) | public String getWeightType() {
    method getWeightIncrement (line 183) | public String getWeightIncrement() {
    method getPrice (line 187) | public String getPrice() {
    method getPriceIncrement (line 191) | public String getPriceIncrement() {
    method getPriceCurrency (line 195) | public String getPriceCurrency() {
    method getUncommonAIs (line 199) | public Map<String,String> getUncommonAIs() {
    method getDisplayResult (line 203) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/ExpandedProductResultParser.java
  class ExpandedProductResultParser (line 41) | public final class ExpandedProductResultParser extends ResultParser {
    method parse (line 43) | @Override
    method findAIvalue (line 175) | private static String findAIvalue(int i, String rawText) {
    method findValue (line 198) | private static String findValue(int i, String rawText) {

FILE: scanner/src/main/java/com/google/zxing/client/result/GeoParsedResult.java
  class GeoParsedResult (line 25) | public final class GeoParsedResult extends ParsedResult {
    method GeoParsedResult (line 32) | GeoParsedResult(double latitude, double longitude, double altitude, St...
    method getGeoURI (line 40) | public String getGeoURI() {
    method getLatitude (line 60) | public double getLatitude() {
    method getLongitude (line 67) | public double getLongitude() {
    method getAltitude (line 74) | public double getAltitude() {
    method getQuery (line 81) | public String getQuery() {
    method getDisplayResult (line 85) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/GeoResultParser.java
  class GeoResultParser (line 32) | public final class GeoResultParser extends ResultParser {
    method parse (line 37) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/ISBNParsedResult.java
  class ISBNParsedResult (line 24) | public final class ISBNParsedResult extends ParsedResult {
    method ISBNParsedResult (line 28) | ISBNParsedResult(String isbn) {
    method getISBN (line 33) | public String getISBN() {
    method getDisplayResult (line 37) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/ISBNResultParser.java
  class ISBNResultParser (line 27) | public final class ISBNResultParser extends ResultParser {
    method parse (line 32) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/ParsedResult.java
  class ParsedResult (line 30) | public abstract class ParsedResult {
    method ParsedResult (line 34) | protected ParsedResult(ParsedResultType type) {
    method getType (line 38) | public final ParsedResultType getType() {
    method getDisplayResult (line 42) | public abstract String getDisplayResult();
    method toString (line 44) | @Override
    method maybeAppend (line 49) | public static void maybeAppend(String value, StringBuilder result) {
    method maybeAppend (line 59) | public static void maybeAppend(String[] values, StringBuilder result) {

FILE: scanner/src/main/java/com/google/zxing/client/result/ParsedResultType.java
  type ParsedResultType (line 25) | public enum ParsedResultType {

FILE: scanner/src/main/java/com/google/zxing/client/result/ProductParsedResult.java
  class ProductParsedResult (line 24) | public final class ProductParsedResult extends ParsedResult {
    method ProductParsedResult (line 29) | ProductParsedResult(String productID) {
    method ProductParsedResult (line 33) | ProductParsedResult(String productID, String normalizedProductID) {
    method getProductID (line 39) | public String getProductID() {
    method getNormalizedProductID (line 43) | public String getNormalizedProductID() {
    method getDisplayResult (line 47) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/ProductResultParser.java
  class ProductResultParser (line 28) | public final class ProductResultParser extends ResultParser {
    method parse (line 31) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/ResultParser.java
  class ResultParser (line 40) | public abstract class ResultParser {
    method parse (line 80) | public abstract ParsedResult parse(Result theResult);
    method getMassagedText (line 82) | protected static String getMassagedText(Result result) {
    method parseResult (line 90) | public static ParsedResult parseResult(Result theResult) {
    method maybeAppend (line 100) | protected static void maybeAppend(String value, StringBuilder result) {
    method maybeAppend (line 107) | protected static void maybeAppend(String[] value, StringBuilder result) {
    method maybeWrap (line 116) | protected static String[] maybeWrap(String value) {
    method unescapeBackslash (line 120) | protected static String unescapeBackslash(String escaped) {
    method parseHexDigit (line 141) | protected static int parseHexDigit(char c) {
    method isStringOfDigits (line 154) | protected static boolean isStringOfDigits(CharSequence value, int leng...
    method isSubstringOfDigits (line 158) | protected static boolean isSubstringOfDigits(CharSequence value, int o...
    method parseNameValuePairs (line 166) | static Map<String,String> parseNameValuePairs(String uri) {
    method appendKeyValue (line 178) | private static void appendKeyValue(CharSequence keyValue, Map<String,S...
    method urlDecode (line 192) | static String urlDecode(String encoded) {
    method matchPrefixedField (line 200) | static String[] matchPrefixedField(String prefix, String rawText, char...
    method countPrecedingBackslashes (line 244) | private static int countPrecedingBackslashes(CharSequence s, int pos) {
    method matchSinglePrefixedField (line 256) | static String matchSinglePrefixedField(String prefix, String rawText, ...

FILE: scanner/src/main/java/com/google/zxing/client/result/SMSMMSResultParser.java
  class SMSMMSResultParser (line 41) | public final class SMSMMSResultParser extends ResultParser {
    method parse (line 43) | @Override
    method addNumberVia (line 89) | private static void addNumberVia(Collection<String> numbers,

FILE: scanner/src/main/java/com/google/zxing/client/result/SMSParsedResult.java
  class SMSParsedResult (line 25) | public final class SMSParsedResult extends ParsedResult {
    method SMSParsedResult (line 32) | public SMSParsedResult(String number,
    method SMSParsedResult (line 43) | public SMSParsedResult(String[] numbers,
    method getSMSURI (line 54) | public String getSMSURI() {
    method getNumbers (line 89) | public String[] getNumbers() {
    method getVias (line 93) | public String[] getVias() {
    method getSubject (line 97) | public String getSubject() {
    method getBody (line 101) | public String getBody() {
    method getDisplayResult (line 105) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/SMSTOMMSTOResultParser.java
  class SMSTOMMSTOResultParser (line 31) | public final class SMSTOMMSTOResultParser extends ResultParser {
    method parse (line 33) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/SMTPResultParser.java
  class SMTPResultParser (line 27) | public final class SMTPResultParser extends ResultParser {
    method parse (line 29) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/TelParsedResult.java
  class TelParsedResult (line 24) | public final class TelParsedResult extends ParsedResult {
    method TelParsedResult (line 30) | public TelParsedResult(String number, String telURI, String title) {
    method getNumber (line 37) | public String getNumber() {
    method getTelURI (line 41) | public String getTelURI() {
    method getTitle (line 45) | public String getTitle() {
    method getDisplayResult (line 49) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/TelResultParser.java
  class TelResultParser (line 26) | public final class TelResultParser extends ResultParser {
    method parse (line 28) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/TextParsedResult.java
  class TextParsedResult (line 25) | public final class TextParsedResult extends ParsedResult {
    method TextParsedResult (line 30) | public TextParsedResult(String text, String language) {
    method getText (line 36) | public String getText() {
    method getLanguage (line 40) | public String getLanguage() {
    method getDisplayResult (line 44) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/URIParsedResult.java
  class URIParsedResult (line 24) | public final class URIParsedResult extends ParsedResult {
    method URIParsedResult (line 29) | public URIParsedResult(String uri, String title) {
    method getURI (line 35) | public String getURI() {
    method getTitle (line 39) | public String getTitle() {
    method isPossiblyMaliciousURI (line 48) | @Deprecated
    method getDisplayResult (line 53) | @Override
    method massageURI (line 65) | private static String massageURI(String uri) {
    method isColonFollowedByPortNumber (line 76) | private static boolean isColonFollowedByPortNumber(String uri, int pro...

FILE: scanner/src/main/java/com/google/zxing/client/result/URIResultParser.java
  class URIResultParser (line 29) | public final class URIResultParser extends ResultParser {
    method parse (line 41) | @Override
    method isPossiblyMaliciousURI (line 64) | static boolean isPossiblyMaliciousURI(String uri) {
    method isBasicallyValidURI (line 68) | static boolean isBasicallyValidURI(String uri) {

FILE: scanner/src/main/java/com/google/zxing/client/result/URLTOResultParser.java
  class URLTOResultParser (line 28) | public final class URLTOResultParser extends ResultParser {
    method parse (line 30) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/VCardResultParser.java
  class VCardResultParser (line 37) | public final class VCardResultParser extends ResultParser {
    method parse (line 50) | @Override
    method matchVCardPrefixedField (line 103) | static List<List<String>> matchVCardPrefixedField(CharSequence prefix,
    method decodeQuotedPrintable (line 223) | private static String decodeQuotedPrintable(CharSequence value, String...
    method maybeAppendFragment (line 256) | private static void maybeAppendFragment(ByteArrayOutputStream fragment...
    method matchSingleVCardPrefixedField (line 276) | static List<String> matchSingleVCardPrefixedField(CharSequence prefix,
    method toPrimaryValue (line 284) | private static String toPrimaryValue(List<String> list) {
    method toPrimaryValues (line 288) | private static String[] toPrimaryValues(Collection<List<String>> lists) {
    method toTypes (line 302) | private static String[] toTypes(Collection<List<String>> lists) {
    method isLikeVCardDate (line 330) | private static boolean isLikeVCardDate(CharSequence value) {
    method formatNames (line 340) | private static void formatNames(Iterable<List<String>> names) {
    method maybeAppendComponent (line 365) | private static void maybeAppendComponent(String[] components, int i, S...

FILE: scanner/src/main/java/com/google/zxing/client/result/VEventResultParser.java
  class VEventResultParser (line 29) | public final class VEventResultParser extends ResultParser {
    method parse (line 31) | @Override
    method matchSingleVCardPrefixedField (line 92) | private static String matchSingleVCardPrefixedField(CharSequence prefix,
    method matchVCardPrefixedField (line 99) | private static String[] matchVCardPrefixedField(CharSequence prefix, S...
    method stripMailto (line 112) | private static String stripMailto(String s) {

FILE: scanner/src/main/java/com/google/zxing/client/result/VINParsedResult.java
  class VINParsedResult (line 23) | public final class VINParsedResult extends ParsedResult {
    method VINParsedResult (line 35) | public VINParsedResult(String vin,
    method getVIN (line 56) | public String getVIN() {
    method getWorldManufacturerID (line 60) | public String getWorldManufacturerID() {
    method getVehicleDescriptorSection (line 64) | public String getVehicleDescriptorSection() {
    method getVehicleIdentifierSection (line 68) | public String getVehicleIdentifierSection() {
    method getCountryCode (line 72) | public String getCountryCode() {
    method getVehicleAttributes (line 76) | public String getVehicleAttributes() {
    method getModelYear (line 80) | public int getModelYear() {
    method getPlantCode (line 84) | public char getPlantCode() {
    method getSequentialNumber (line 88) | public String getSequentialNumber() {
    method getDisplayResult (line 92) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/VINResultParser.java
  class VINResultParser (line 29) | public final class VINResultParser extends ResultParser {
    method parse (line 34) | @Override
    method checkChecksum (line 63) | private static boolean checkChecksum(CharSequence vin) {
    method vinCharValue (line 73) | private static int vinCharValue(char c) {
    method vinPositionWeight (line 89) | private static int vinPositionWeight(int position) {
    method checkChar (line 105) | private static char checkChar(int remainder) {
    method modelYear (line 115) | private static int modelYear(char c) {
    method countryCode (line 140) | private static String countryCode(CharSequence wmi) {

FILE: scanner/src/main/java/com/google/zxing/client/result/WifiParsedResult.java
  class WifiParsedResult (line 24) | public final class WifiParsedResult extends ParsedResult {
    method WifiParsedResult (line 35) | public WifiParsedResult(String networkEncryption, String ssid, String ...
    method WifiParsedResult (line 39) | public WifiParsedResult(String networkEncryption, String ssid, String ...
    method WifiParsedResult (line 43) | public WifiParsedResult(String networkEncryption, String ssid, String ...
    method getSsid (line 55) | public String getSsid() {
    method getNetworkEncryption (line 59) | public String getNetworkEncryption() {
    method getPassword (line 63) | public String getPassword() {
    method isHidden (line 67) | public boolean isHidden() {
    method getIdentity (line 71) | public String getIdentity() {
    method getAnonymousIdentity (line 75) | public String getAnonymousIdentity() {
    method getEapMethod (line 79) | public String getEapMethod() {
    method getPhase2Method (line 83) | public String getPhase2Method() {
    method getDisplayResult (line 87) | @Override

FILE: scanner/src/main/java/com/google/zxing/client/result/WifiResultParser.java
  class WifiResultParser (line 38) | public final class WifiResultParser extends ResultParser {
    method parse (line 40) | @Override

FILE: scanner/src/main/java/com/google/zxing/common/BitArray.java
  class BitArray (line 26) | public final class BitArray implements Cloneable {
    method BitArray (line 31) | public BitArray() {
    method BitArray (line 36) | public BitArray(int size) {
    method BitArray (line 42) | BitArray(int[] bits, int size) {
    method getSize (line 47) | public int getSize() {
    method getSizeInBytes (line 51) | public int getSizeInBytes() {
    method ensureCapacity (line 55) | private void ensureCapacity(int size) {
    method get (line 67) | public boolean get(int i) {
    method set (line 76) | public void set(int i) {
    method flip (line 85) | public void flip(int i) {
    method getNextSet (line 95) | public int getNextSet(int from) {
    method getNextUnset (line 118) | public int getNextUnset(int from) {
    method setBulk (line 143) | public void setBulk(int i, int newBits) {
    method setRange (line 153) | public void setRange(int start, int end) {
    method clear (line 175) | public void clear() {
    method isRange (line 191) | public boolean isRange(int start, int end, boolean value) {
    method appendBit (line 216) | public void appendBit(boolean bit) {
    method appendBits (line 232) | public void appendBits(int value, int numBits) {
    method appendBitArray (line 242) | public void appendBitArray(BitArray other) {
    method xor (line 250) | public void xor(BitArray other) {
    method toBytes (line 269) | public void toBytes(int bitOffset, byte[] array, int offset, int numBy...
    method getBitArray (line 286) | public int[] getBitArray() {
    method reverse (line 293) | public void reverse() {
    method makeArray (line 322) | private static int[] makeArray(int size) {
    method equals (line 326) | @Override
    method hashCode (line 335) | @Override
    method toString (line 340) | @Override
    method clone (line 352) | @Override

FILE: scanner/src/main/java/com/google/zxing/common/BitMatrix.java
  class BitMatrix (line 36) | public final class BitMatrix implements Cloneable {
    method BitMatrix (line 48) | public BitMatrix(int dimension) {
    method BitMatrix (line 58) | public BitMatrix(int width, int height) {
    method BitMatrix (line 68) | private BitMatrix(int width, int height, int rowSize, int[] bits) {
    method parse (line 81) | public static BitMatrix parse(boolean[][] image) {
    method parse (line 96) | public static BitMatrix parse(String stringRepresentation, String setS...
    method get (line 160) | public boolean get(int x, int y) {
    method set (line 171) | public void set(int x, int y) {
    method unset (line 176) | public void unset(int x, int y) {
    method flip (line 187) | public void flip(int x, int y) {
    method xor (line 198) | public void xor(BitMatrix mask) {
    method clear (line 216) | public void clear() {
    method setRegion (line 231) | public void setRegion(int left, int top, int width, int height) {
    method getRow (line 259) | public BitArray getRow(int y, BitArray row) {
    method setRow (line 276) | public void setRow(int y, BitArray row) {
    method rotate180 (line 283) | public void rotate180() {
    method getEnclosingRectangle (line 303) | public int[] getEnclosingRectangle() {
    method getTopLeftOnBit (line 353) | public int[] getTopLeftOnBit() {
    method getBottomRightOnBit (line 373) | public int[] getBottomRightOnBit() {
    method getWidth (line 398) | public int getWidth() {
    method getHeight (line 405) | public int getHeight() {
    method getRowSize (line 412) | public int getRowSize() {
    method equals (line 416) | @Override
    method hashCode (line 426) | @Override
    method toString (line 439) | @Override
    method toString (line 449) | public String toString(String setString, String unsetString) {
    method toString (line 460) | @Deprecated
    method buildToString (line 465) | private String buildToString(String setString, String unsetString, Str...
    method clone (line 476) | @Override

FILE: scanner/src/main/java/com/google/zxing/common/BitSource.java
  class BitSource (line 28) | public final class BitSource {
    method BitSource (line 38) | public BitSource(byte[] bytes) {
    method getBitOffset (line 45) | public int getBitOffset() {
    method getByteOffset (line 52) | public int getByteOffset() {
    method readBits (line 62) | public int readBits(int numBits) {
    method available (line 107) | public int available() {

FILE: scanner/src/main/java/com/google/zxing/common/CharacterSetECI.java
  type CharacterSetECI (line 30) | public enum CharacterSetECI {
    method CharacterSetECI (line 78) | CharacterSetECI(int value) {
    method CharacterSetECI (line 82) | CharacterSetECI(int value, String... otherEncodingNames) {
    method CharacterSetECI (line 87) | CharacterSetECI(int[] values, String... otherEncodingNames) {
    method getValue (line 92) | public int getValue() {
    method getCharacterSetECIByValue (line 102) | public static CharacterSetECI getCharacterSetECIByValue(int value) thr...
    method getCharacterSetECIByName (line 114) | public static CharacterSetECI getCharacterSetECIByName(String name) {

FILE: scanner/src/main/java/com/google/zxing/common/DecoderResult.java
  class DecoderResult (line 28) | public final class DecoderResult {
    method DecoderResult (line 41) | public DecoderResult(byte[] rawBytes,
    method DecoderResult (line 48) | public DecoderResult(byte[] rawBytes,
    method getRawBytes (line 66) | public byte[] getRawBytes() {
    method getNumBits (line 74) | public int getNumBits() {
    method setNumBits (line 82) | public void setNumBits(int numBits) {
    method getText (line 89) | public String getText() {
    method getByteSegments (line 96) | public List<byte[]> getByteSegments() {
    method getECLevel (line 103) | public String getECLevel() {
    method getErrorsCorrected (line 110) | public Integer getErrorsCorrected() {
    method setErrorsCorrected (line 114) | public void setErrorsCorrected(Integer errorsCorrected) {
    method getErasures (line 121) | public Integer getErasures() {
    method setErasures (line 125) | public void setErasures(Integer erasures) {
    method getOther (line 132) | public Object getOther() {
    method setOther (line 136) | public void setOther(Object other) {
    method hasStructuredAppend (line 140) | public boolean hasStructuredAppend() {
    method getStructuredAppendParity (line 144) | public int getStructuredAppendParity() {
    method getStructuredAppendSequenceNumber (line 148) | public int getStructuredAppendSequenceNumber() {

FILE: scanner/src/main/java/com/google/zxing/common/DefaultGridSampler.java
  class DefaultGridSampler (line 24) | public final class DefaultGridSampler extends GridSampler {
    method sampleGrid (line 26) | @Override
    method sampleGrid (line 46) | @Override

FILE: scanner/src/main/java/com/google/zxing/common/DetectorResult.java
  class DetectorResult (line 28) | public class DetectorResult {
    method DetectorResult (line 33) | public DetectorResult(BitMatrix bits, ResultPoint[] points) {
    method getBits (line 38) | public final BitMatrix getBits() {
    method getPoints (line 42) | public final ResultPoint[] getPoints() {

FILE: scanner/src/main/java/com/google/zxing/common/GlobalHistogramBinarizer.java
  class GlobalHistogramBinarizer (line 34) | public class GlobalHistogramBinarizer extends Binarizer {
    method GlobalHistogramBinarizer (line 44) | public GlobalHistogramBinarizer(LuminanceSource source) {
    method getBlackRow (line 51) | @Override
    method getBlackMatrix (line 93) | @Override
    method createBinarizer (line 132) | @Override
    method initArrays (line 137) | private void initArrays(int luminanceSize) {
    method estimateBlackPoint (line 146) | private static int estimateBlackPoint(int[] buckets) throws NotFoundEx...

FILE: scanner/src/main/java/com/google/zxing/common/GridSampler.java
  class GridSampler (line 34) | public abstract class GridSampler {
    method setGridSampler (line 47) | public static void setGridSampler(GridSampler newGridSampler) {
    method getInstance (line 54) | public static GridSampler getInstance() {
    method sampleGrid (line 87) | public abstract BitMatrix sampleGrid(BitMatrix image,
    method sampleGrid (line 99) | public abstract BitMatrix sampleGrid(BitMatrix image,
    method checkAndNudgePoints (line 119) | protected static void checkAndNudgePoints(BitMatrix image,

FILE: scanner/src/main/java/com/google/zxing/common/HybridBinarizer.java
  class HybridBinarizer (line 40) | public final class HybridBinarizer extends GlobalHistogramBinarizer {
    method HybridBinarizer (line 52) | public HybridBinarizer(LuminanceSource source) {
    method getBlackMatrix (line 61) | @Override
    method createBinarizer (line 91) | @Override
    method calculateThresholdForBlock (line 101) | private static void calculateThresholdForBlock(byte[] luminances,
    method cap (line 133) | private static int cap(int value, int min, int max) {
    method thresholdBlock (line 140) | private static void thresholdBlock(byte[] luminances,
    method calculateBlackPoints (line 161) | private static int[][] calculateBlackPoints(byte[] luminances,

FILE: scanner/src/main/java/com/google/zxing/common/PerspectiveTransform.java
  class PerspectiveTransform (line 26) | public final class PerspectiveTransform {
    method PerspectiveTransform (line 38) | private PerspectiveTransform(float a11, float a21, float a31,
    method quadrilateralToQuadrilateral (line 52) | public static PerspectiveTransform quadrilateralToQuadrilateral(float ...
    method transformPoints (line 66) | public void transformPoints(float[] points) {
    method transformPoints (line 86) | public void transformPoints(float[] xValues, float[] yValues) {
    method squareToQuadrilateral (line 97) | public static PerspectiveTransform squareToQuadrilateral(float x0, flo...
    method quadrilateralToSquare (line 122) | public static PerspectiveTransform quadrilateralToSquare(float x0, flo...
    method buildAdjoint (line 130) | PerspectiveTransform buildAdjoint() {
    method times (line 143) | PerspectiveTransform times(PerspectiveTransform other) {

FILE: scanner/src/main/java/com/google/zxing/common/StringUtils.java
  class StringUtils (line 30) | public final class StringUtils {
    method StringUtils (line 42) | private StringUtils() { }
    method guessEncoding (line 51) | public static String guessEncoding(byte[] bytes, Map<DecodeHintType,?>...

FILE: scanner/src/main/java/com/google/zxing/common/detector/MathUtils.java
  class MathUtils (line 22) | public final class MathUtils {
    method MathUtils (line 24) | private MathUtils() {
    method round (line 36) | public static int round(float d) {
    method distance (line 47) | public static float distance(float aX, float aY, float bX, float bY) {
    method distance (line 60) | public static float distance(int aX, int aY, int bX, int bY) {
    method sum (line 70) | public static int sum(int[] array) {

FILE: scanner/src/main/java/com/google/zxing/common/detector/MonochromeRectangleDetector.java
  class MonochromeRectangleDetector (line 31) | @Deprecated
    method MonochromeRectangleDetector (line 38) | public MonochromeRectangleDetector(BitMatrix image) {
    method detect (line 52) | public ResultPoint[] detect() throws NotFoundException {
    method findCornerFromCenter (line 102) | private ResultPoint findCornerFromCenter(int centerX,
    method blackWhiteRange (line 170) | private int[] blackWhiteRange(int fixedDimension, int maxWhiteRun, int...

FILE: scanner/src/main/java/com/google/zxing/common/detector/WhiteRectangleDetector.java
  class WhiteRectangleDetector (line 33) | public final class WhiteRectangleDetector {
    method WhiteRectangleDetector (line 46) | public WhiteRectangleDetector(BitMatrix image) throws NotFoundException {
    method WhiteRectangleDetector (line 57) | public WhiteRectangleDetector(BitMatrix image, int initSize, int x, in...
    method detect (line 85) | public ResultPoint[] detect() throws NotFoundException {
    method getBlackPointOnSegment (line 235) | private ResultPoint getBlackPointOnSegment(float aX, float aY, float b...
    method centerEdges (line 263) | private ResultPoint[] centerEdges(ResultPoint y, ResultPoint z,
    method containsBlackPoint (line 306) | private boolean containsBlackPoint(int a, int b, int fixed, boolean ho...

FILE: scanner/src/main/java/com/google/zxing/common/reedsolomon/GenericGF.java
  class GenericGF (line 30) | public final class GenericGF {
    method GenericGF (line 60) | public GenericGF(int primitive, int size, int b) {
    method getZero (line 84) | GenericGFPoly getZero() {
    method getOne (line 88) | GenericGFPoly getOne() {
    method buildMonomial (line 95) | GenericGFPoly buildMonomial(int degree, int coefficient) {
    method addOrSubtract (line 112) | static int addOrSubtract(int a, int b) {
    method exp (line 119) | int exp(int a) {
    method log (line 126) | int log(int a) {
    method inverse (line 136) | int inverse(int a) {
    method multiply (line 146) | int multiply(int a, int b) {
    method getSize (line 153) | public int getSize() {
    method getGeneratorBase (line 157) | public int getGeneratorBase() {
    method toString (line 161) | @Override

FILE: scanner/src/main/java/com/google/zxing/common/reedsolomon/GenericGFPoly.java
  class GenericGFPoly (line 28) | final class GenericGFPoly {
    method GenericGFPoly (line 42) | GenericGFPoly(GenericGF field, int[] coefficients) {
    method getCoefficients (line 69) | int[] getCoefficients() {
    method getDegree (line 76) | int getDegree() {
    method isZero (line 83) | boolean isZero() {
    method getCoefficient (line 90) | int getCoefficient(int degree) {
    method evaluateAt (line 97) | int evaluateAt(int a) {
    method addOrSubtract (line 118) | GenericGFPoly addOrSubtract(GenericGFPoly other) {
    method multiply (line 148) | GenericGFPoly multiply(GenericGFPoly other) {
    method multiply (line 170) | GenericGFPoly multiply(int scalar) {
    method multiplyByMonomial (line 185) | GenericGFPoly multiplyByMonomial(int degree, int coefficient) {
    method divide (line 200) | GenericGFPoly[] divide(GenericGFPoly other) {
    method toString (line 226) | @Override

FILE: scanner/src/main/java/com/google/zxing/common/reedsolomon/ReedSolomonDecoder.java
  class ReedSolomonDecoder (line 41) | public final class ReedSolomonDecoder {
    method ReedSolomonDecoder (line 45) | public ReedSolomonDecoder(GenericGF field) {
    method decode (line 58) | public void decode(int[] received, int twoS) throws ReedSolomonExcepti...
    method runEuclideanAlgorithm (line 88) | private GenericGFPoly[] runEuclideanAlgorithm(GenericGFPoly a, Generic...
    method findErrorLocations (line 143) | private int[] findErrorLocations(GenericGFPoly errorLocator) throws Re...
    method findErrorMagnitudes (line 163) | private int[] findErrorMagnitudes(GenericGFPoly errorEvaluator, int[] ...

FILE: scanner/src/main/java/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java
  class ReedSolomonEncoder (line 28) | public final class ReedSolomonEncoder {
    method ReedSolomonEncoder (line 33) | public ReedSolomonEncoder(GenericGF field) {
    method buildGenerator (line 39) | private GenericGFPoly buildGenerator(int degree) {
    method encode (line 52) | public void encode(int[] toEncode, int ecBytes) {

FILE: scanner/src/main/java/com/google/zxing/common/reedsolomon/ReedSolomonException.java
  class ReedSolomonException (line 25) | public final class ReedSolomonException extends Exception {
    method ReedSolomonException (line 27) | public ReedSolomonException(String message) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/DataMatrixReader.java
  class DataMatrixReader (line 43) | public final class DataMatrixReader implements Reader {
    method decode (line 57) | @Override
    method decode (line 62) | @Override
    method reset (line 89) | @Override
    method extractPureBits (line 102) | private static BitMatrix extractPureBits(BitMatrix image) throws NotFo...
    method moduleSize (line 143) | private static int moduleSize(int[] leftTopBlack, BitMatrix image) thr...

FILE: scanner/src/main/java/com/google/zxing/datamatrix/DataMatrixWriter.java
  class DataMatrixWriter (line 39) | public final class DataMatrixWriter implements Writer {
    method encode (line 41) | @Override
    method encode (line 46) | @Override
    method encodeLowLevel (line 106) | private static BitMatrix encodeLowLevel(DefaultPlacement placement, Sy...
    method convertByteMatrixToBitMatrix (line 163) | private static BitMatrix convertByteMatrixToBitMatrix(ByteMatrix matri...

FILE: scanner/src/main/java/com/google/zxing/datamatrix/decoder/BitMatrixParser.java
  class BitMatrixParser (line 25) | final class BitMatrixParser {
    method BitMatrixParser (line 35) | BitMatrixParser(BitMatrix bitMatrix) throws FormatException {
    method getVersion (line 46) | Version getVersion() {
    method readVersion (line 61) | private static Version readVersion(BitMatrix bitMatrix) throws FormatE...
    method readCodewords (line 75) | byte[] readCodewords() throws FormatException {
    method readModule (line 154) | private boolean readModule(int row, int column, int numRows, int numCo...
    method readUtah (line 179) | private int readUtah(int row, int column, int numRows, int numColumns) {
    method readCorner1 (line 224) | private int readCorner1(int numRows, int numColumns) {
    method readCorner2 (line 269) | private int readCorner2(int numRows, int numColumns) {
    method readCorner3 (line 314) | private int readCorner3(int numRows, int numColumns) {
    method readCorner4 (line 359) | private int readCorner4(int numRows, int numColumns) {
    method extractDataRegion (line 402) | private BitMatrix extractDataRegion(BitMatrix bitMatrix) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/decoder/DataBlock.java
  class DataBlock (line 26) | final class DataBlock {
    method DataBlock (line 31) | private DataBlock(int numDataCodewords, byte[] codewords) {
    method getDataBlocks (line 46) | static DataBlock[] getDataBlocks(byte[] rawCodewords,
    method getNumDataCodewords (line 110) | int getNumDataCodewords() {
    method getCodewords (line 114) | byte[] getCodewords() {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java
  class DecodedBitStreamParser (line 37) | final class DecodedBitStreamParser {
    type Mode (line 39) | private enum Mode {
    method DecodedBitStreamParser (line 82) | private DecodedBitStreamParser() {
    method decode (line 85) | static DecoderResult decode(byte[] bytes) throws FormatException {
    method decodeAsciiSegment (line 126) | private static Mode decodeAsciiSegment(BitSource bits,
    method decodeC40Segment (line 201) | private static void decodeC40Segment(BitSource bits, StringBuilder res...
    method decodeTextSegment (line 291) | private static void decodeTextSegment(BitSource bits, StringBuilder re...
    method decodeAnsiX12Segment (line 386) | private static void decodeAnsiX12Segment(BitSource bits,
    method parseTwoBytes (line 433) | private static void parseTwoBytes(int firstByte, int secondByte, int[]...
    method decodeEdifactSegment (line 446) | private static void decodeEdifactSegment(BitSource bits, StringBuilder...
    method decodeBase256Segment (line 477) | private static void decodeBase256Segment(BitSource bits,
    method unrandomize255State (line 518) | private static int unrandomize255State(int randomizedBase256Codeword,

FILE: scanner/src/main/java/com/google/zxing/datamatrix/decoder/Decoder.java
  class Decoder (line 33) | public final class Decoder {
    method Decoder (line 37) | public Decoder() {
    method decode (line 50) | public DecoderResult decode(boolean[][] image) throws FormatException,...
    method decode (line 63) | public DecoderResult decode(BitMatrix bits) throws FormatException, Ch...
    method correctErrors (line 106) | private void correctErrors(byte[] codewordBytes, int numDataCodewords)...

FILE: scanner/src/main/java/com/google/zxing/datamatrix/decoder/Version.java
  class Version (line 27) | public final class Version {
    method Version (line 39) | private Version(int versionNumber,
    method getVersionNumber (line 62) | public int getVersionNumber() {
    method getSymbolSizeRows (line 66) | public int getSymbolSizeRows() {
    method getSymbolSizeColumns (line 70) | public int getSymbolSizeColumns() {
    method getDataRegionSizeRows (line 74) | public int getDataRegionSizeRows() {
    method getDataRegionSizeColumns (line 78) | public int getDataRegionSizeColumns() {
    method getTotalCodewords (line 82) | public int getTotalCodewords() {
    method getECBlocks (line 86) | ECBlocks getECBlocks() {
    method getVersionForDimensions (line 98) | public static Version getVersionForDimensions(int numRows, int numColu...
    class ECBlocks (line 118) | static final class ECBlocks {
      method ECBlocks (line 122) | private ECBlocks(int ecCodewords, ECB ecBlocks) {
      method ECBlocks (line 127) | private ECBlocks(int ecCodewords, ECB ecBlocks1, ECB ecBlocks2) {
      method getECCodewords (line 132) | int getECCodewords() {
      method getECBlocks (line 136) | ECB[] getECBlocks() {
    class ECB (line 146) | static final class ECB {
      method ECB (line 150) | private ECB(int count, int dataCodewords) {
      method getCount (line 155) | int getCount() {
      method getDataCodewords (line 159) | int getDataCodewords() {
    method toString (line 164) | @Override
    method buildVersions (line 172) | private static Version[] buildVersions() {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/detector/Detector.java
  class Detector (line 32) | public final class Detector {
    method Detector (line 37) | public Detector(BitMatrix image) throws NotFoundException {
    method detect (line 48) | public DetectorResult detect() throws NotFoundException {
    method shiftPoint (line 90) | private ResultPoint shiftPoint(ResultPoint point, ResultPoint to, int ...
    method moveAway (line 96) | private ResultPoint moveAway(ResultPoint point, float fromX, float fro...
    method detectSolid1 (line 118) | private ResultPoint[] detectSolid1(ResultPoint[] cornerPoints) {
    method detectSolid2 (line 163) | private ResultPoint[] detectSolid2(ResultPoint[] points) {
    method correctTopRight (line 203) | private ResultPoint correctTopRight(ResultPoint[] points) {
    method shiftToModuleCenter (line 251) | private ResultPoint[] shiftToModuleCenter(ResultPoint[] points) {
    method isValid (line 303) | private boolean isValid(ResultPoint p) {
    method sampleGrid (line 307) | private static BitMatrix sampleGrid(BitMatrix image,
    method transitionsBetween (line 341) | private int transitionsBetween(ResultPoint from, ResultPoint to) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/ASCIIEncoder.java
  class ASCIIEncoder (line 19) | final class ASCIIEncoder implements Encoder {
    method getEncodingMode (line 21) | @Override
    method encode (line 26) | @Override
    method encodeASCIIDigits (line 74) | private static char encodeASCIIDigits(char digit1, char digit2) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/Base256Encoder.java
  class Base256Encoder (line 19) | final class Base256Encoder implements Encoder {
    method getEncodingMode (line 21) | @Override
    method encode (line 26) | @Override
    method randomize255State (line 65) | private static char randomize255State(char ch, int codewordPosition) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/C40Encoder.java
  class C40Encoder (line 19) | class C40Encoder implements Encoder {
    method getEncodingMode (line 21) | @Override
    method encode (line 26) | @Override
    method backtrackOneCharacter (line 67) | private int backtrackOneCharacter(EncoderContext context,
    method writeNextTriplet (line 78) | static void writeNextTriplet(EncoderContext context, StringBuilder buf...
    method handleEOD (line 89) | void handleEOD(EncoderContext context, StringBuilder buffer) {
    method encodeChar (line 127) | int encodeChar(char c, StringBuilder sb) {
    method encodeToCodewords (line 171) | private static String encodeToCodewords(CharSequence sb, int startPos) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/DataMatrixSymbolInfo144.java
  class DataMatrixSymbolInfo144 (line 19) | final class DataMatrixSymbolInfo144 extends SymbolInfo {
    method DataMatrixSymbolInfo144 (line 21) | DataMatrixSymbolInfo144() {
    method getInterleavedBlockCount (line 25) | @Override
    method getDataLengthForInterleavedBlock (line 30) | @Override

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/DefaultPlacement.java
  class DefaultPlacement (line 24) | public class DefaultPlacement {
    method DefaultPlacement (line 38) | public DefaultPlacement(CharSequence codewords, int numcols, int numro...
    method getNumrows (line 46) | final int getNumrows() {
    method getNumcols (line 50) | final int getNumcols() {
    method getBits (line 54) | final byte[] getBits() {
    method getBit (line 58) | public final boolean getBit(int col, int row) {
    method setBit (line 62) | private void setBit(int col, int row, boolean bit) {
    method hasBit (line 66) | private boolean hasBit(int col, int row) {
    method place (line 70) | public final void place() {
    method module (line 121) | private void module(int row, int col, int pos, int bit) {
    method utah (line 143) | private void utah(int row, int col, int pos) {
    method corner1 (line 154) | private void corner1(int pos) {
    method corner2 (line 165) | private void corner2(int pos) {
    method corner3 (line 176) | private void corner3(int pos) {
    method corner4 (line 187) | private void corner4(int pos) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/EdifactEncoder.java
  class EdifactEncoder (line 19) | final class EdifactEncoder implements Encoder {
    method getEncodingMode (line 21) | @Override
    method encode (line 26) | @Override
    method handleEOD (line 58) | private static void handleEOD(EncoderContext context, CharSequence buf...
    method encodeChar (line 108) | private static void encodeChar(char c, StringBuilder sb) {
    method encodeToCodewords (line 118) | private static String encodeToCodewords(CharSequence sb, int startPos) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/Encoder.java
  type Encoder (line 19) | interface Encoder {
    method getEncodingMode (line 21) | int getEncodingMode();
    method encode (line 23) | void encode(EncoderContext context);

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/EncoderContext.java
  class EncoderContext (line 23) | final class EncoderContext {
    method EncoderContext (line 35) | EncoderContext(String msg) {
    method setSymbolShape (line 52) | public void setSymbolShape(SymbolShapeHint shape) {
    method setSizeConstraints (line 56) | public void setSizeConstraints(Dimension minSize, Dimension maxSize) {
    method getMessage (line 61) | public String getMessage() {
    method setSkipAtEnd (line 65) | public void setSkipAtEnd(int count) {
    method getCurrentChar (line 69) | public char getCurrentChar() {
    method getCurrent (line 73) | public char getCurrent() {
    method getCodewords (line 77) | public StringBuilder getCodewords() {
    method writeCodewords (line 81) | public void writeCodewords(String codewords) {
    method writeCodeword (line 85) | public void writeCodeword(char codeword) {
    method getCodewordCount (line 89) | public int getCodewordCount() {
    method getNewEncoding (line 93) | public int getNewEncoding() {
    method signalEncoderChange (line 97) | public void signalEncoderChange(int encoding) {
    method resetEncoderSignal (line 101) | public void resetEncoderSignal() {
    method hasMoreCharacters (line 105) | public boolean hasMoreCharacters() {
    method getTotalMessageCharCount (line 109) | private int getTotalMessageCharCount() {
    method getRemainingCharacters (line 113) | public int getRemainingCharacters() {
    method getSymbolInfo (line 117) | public SymbolInfo getSymbolInfo() {
    method updateSymbolInfo (line 121) | public void updateSymbolInfo() {
    method updateSymbolInfo (line 125) | public void updateSymbolInfo(int len) {
    method resetSymbolInfo (line 131) | public void resetSymbolInfo() {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/ErrorCorrection.java
  class ErrorCorrection (line 22) | public final class ErrorCorrection {
    method ErrorCorrection (line 91) | private ErrorCorrection() {
    method encodeECC200 (line 101) | public static String encodeECC200(String codewords, SymbolInfo symbolI...
    method createECCBlock (line 141) | private static String createECCBlock(CharSequence codewords, int numEC...
    method createECCBlock (line 145) | private static String createECCBlock(CharSequence codewords, int start...

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/HighLevelEncoder.java
  class HighLevelEncoder (line 27) | public final class HighLevelEncoder {
    method HighLevelEncoder (line 111) | private HighLevelEncoder() {
    method randomize253State (line 128) | private static char randomize253State(char ch, int codewordPosition) {
    method encodeHighLevel (line 141) | public static String encodeHighLevel(String msg) {
    method encodeHighLevel (line 156) | public static String encodeHighLevel(String msg,
    method lookAheadTest (line 209) | static int lookAheadTest(CharSequence msg, int startpos, int currentMo...
    method findMinimums (line 360) | private static int findMinimums(float[] charCounts, int[] intCharCount...
    method getMinimumCount (line 377) | private static int getMinimumCount(byte[] mins) {
    method isDigit (line 385) | static boolean isDigit(char ch) {
    method isExtendedASCII (line 389) | static boolean isExtendedASCII(char ch) {
    method isNativeC40 (line 393) | private static boolean isNativeC40(char ch) {
    method isNativeText (line 397) | private static boolean isNativeText(char ch) {
    method isNativeX12 (line 401) | private static boolean isNativeX12(char ch) {
    method isX12TermSep (line 405) | private static boolean isX12TermSep(char ch) {
    method isNativeEDIFACT (line 411) | private static boolean isNativeEDIFACT(char ch) {
    method isSpecialB256 (line 415) | private static boolean isSpecialB256(char ch) {
    method determineConsecutiveDigitCount (line 426) | public static int determineConsecutiveDigitCount(CharSequence msg, int...
    method illegalCharacter (line 443) | static void illegalCharacter(char c) {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/SymbolInfo.java
  class SymbolInfo (line 26) | public class SymbolInfo {
    method overrideSymbolSet (line 80) | public static void overrideSymbolSet(SymbolInfo[] override) {
    method SymbolInfo (line 84) | public SymbolInfo(boolean rectangular, int dataCapacity, int errorCode...
    method SymbolInfo (line 90) | SymbolInfo(boolean rectangular, int dataCapacity, int errorCodewords,
    method lookup (line 103) | public static SymbolInfo lookup(int dataCodewords) {
    method lookup (line 107) | public static SymbolInfo lookup(int dataCodewords, SymbolShapeHint sha...
    method lookup (line 111) | public static SymbolInfo lookup(int dataCodewords, boolean allowRectan...
    method lookup (line 117) | private static SymbolInfo lookup(int dataCodewords, SymbolShapeHint sh...
    method lookup (line 121) | public static SymbolInfo lookup(int dataCodewords,
    method getHorizontalDataRegions (line 155) | private int getHorizontalDataRegions() {
    method getVerticalDataRegions (line 171) | private int getVerticalDataRegions() {
    method getSymbolDataWidth (line 187) | public final int getSymbolDataWidth() {
    method getSymbolDataHeight (line 191) | public final int getSymbolDataHeight() {
    method getSymbolWidth (line 195) | public final int getSymbolWidth() {
    method getSymbolHeight (line 199) | public final int getSymbolHeight() {
    method getCodewordCount (line 203) | public int getCodewordCount() {
    method getInterleavedBlockCount (line 207) | public int getInterleavedBlockCount() {
    method getDataCapacity (line 211) | public final int getDataCapacity() {
    method getErrorCodewords (line 215) | public final int getErrorCodewords() {
    method getDataLengthForInterleavedBlock (line 219) | public int getDataLengthForInterleavedBlock(int index) {
    method getErrorLengthForInterleavedBlock (line 223) | public final int getErrorLengthForInterleavedBlock(int index) {
    method toString (line 227) | @Override

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/SymbolShapeHint.java
  type SymbolShapeHint (line 23) | public enum SymbolShapeHint {

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/TextEncoder.java
  class TextEncoder (line 19) | final class TextEncoder extends C40Encoder {
    method getEncodingMode (line 21) | @Override
    method encodeChar (line 26) | @Override

FILE: scanner/src/main/java/com/google/zxing/datamatrix/encoder/X12Encoder.java
  class X12Encoder (line 19) | final class X12Encoder extends C40Encoder {
    method getEncodingMode (line 21) | @Override
    method encode (line 26) | @Override
    method encodeChar (line 51) | @Override
    method handleEOD (line 79) | @Override

FILE: scanner/src/main/java/com/google/zxing/maxicode/MaxiCodeReader.java
  class MaxiCodeReader (line 38) | public final class MaxiCodeReader implements Reader {
    method decode (line 54) | @Override
    method decode (line 59) | @Override
    method reset (line 75) | @Override
    method extractPureBits (line 89) | private static BitMatrix extractPureBits(BitMatrix image) throws NotFo...

FILE: scanner/src/main/java/com/google/zxing/maxicode/decoder/BitMatrixParser.java
  class BitMatrixParser (line 25) | final class BitMatrixParser {
    method BitMatrixParser (line 68) | BitMatrixParser(BitMatrix bitMatrix) {
    method readCodewords (line 72) | byte[] readCodewords() {

FILE: scanner/src/main/java/com/google/zxing/maxicode/decoder/DecodedBitStreamParser.java
  class DecodedBitStreamParser (line 30) | final class DecodedBitStreamParser {
    method DecodedBitStreamParser (line 70) | private DecodedBitStreamParser() {
    method decode (line 73) | static DecoderResult decode(byte[] bytes, int mode) {
    method getBit (line 106) | private static int getBit(int bit, byte[] bytes) {
    method getInt (line 111) | private static int getInt(byte[] bytes, byte[] x) {
    method getCountry (line 122) | private static int getCountry(byte[] bytes) {
    method getServiceClass (line 126) | private static int getServiceClass(byte[] bytes) {
    method getPostCode2Length (line 130) | private static int getPostCode2Length(byte[] bytes) {
    method getPostCode2 (line 134) | private static int getPostCode2(byte[] bytes) {
    method getPostCode3 (line 139) | private static String getPostCode3(byte[] bytes) {
    method getMessage (line 152) | private static String getMessage(byte[] bytes, int start, int len) {

FILE: scanner/src/main/java/com/google/zxing/maxicode/decoder/Decoder.java
  class Decoder (line 36) | public final class Decoder {
    method Decoder (line 44) | public Decoder() {
    method decode (line 48) | public DecoderResult decode(BitMatrix bits) throws ChecksumException, ...
    method decode (line 52) | public DecoderResult decode(BitMatrix bits,
    method correctErrors (line 83) | private void correctErrors(byte[] codewordBytes,

FILE: scanner/src/main/java/com/google/zxing/multi/ByQuadrantReader.java
  class ByQuadrantReader (line 39) | public final class ByQuadrantReader implements Reader {
    method ByQuadrantReader (line 43) | public ByQuadrantReader(Reader delegate) {
    method decode (line 47) | @Override
    method decode (line 53) | @Override
    method reset (line 101) | @Override
    method makeAbsolute (line 106) | private static void makeAbsolute(ResultPoint[] points, int leftOffset,...

FILE: scanner/src/main/java/com/google/zxing/multi/GenericMultipleBarcodeReader.java
  class GenericMultipleBarcodeReader (line 45) | public final class GenericMultipleBarcodeReader implements MultipleBarco...
    method GenericMultipleBarcodeReader (line 54) | public GenericMultipleBarcodeReader(Reader delegate) {
    method decodeMultiple (line 58) | @Override
    method decodeMultiple (line 63) | @Override
    method doDecodeMultiple (line 74) | private void doDecodeMultiple(BinaryBitmap image,
    method translateResultPoints (line 160) | private static Result translateResultPoints(Result result, int xOffset...

FILE: scanner/src/main/java/com/google/zxing/multi/MultipleBarcodeReader.java
  type MultipleBarcodeReader (line 32) | public interface MultipleBarcodeReader {
    method decodeMultiple (line 34) | Result[] decodeMultiple(BinaryBitmap image) throws NotFoundException;
    method decodeMultiple (line 36) | Result[] decodeMultiple(BinaryBitmap image,

FILE: scanner/src/main/java/com/google/zxing/multi/qrcode/QRCodeMultiReader.java
  class QRCodeMultiReader (line 48) | public final class QRCodeMultiReader extends QRCodeReader implements Mul...
    method decodeMultiple (line 53) | @Override
    method decodeMultiple (line 58) | @Override
    method processStructuredAppend (line 99) | private static List<Result> processStructuredAppend(List<Result> resul...
    class SAComparator (line 166) | private static final class SAComparator implements Comparator<Result>,...
      method compare (line 167) | @Override

FILE: scanner/src/main/java/com/google/zxing/multi/qrcode/detector/MultiDetector.java
  class MultiDetector (line 39) | public final class MultiDetector extends Detector {
    method MultiDetector (line 43) | public MultiDetector(BitMatrix image) {
    method detectMulti (line 47) | public DetectorResult[] detectMulti(Map<DecodeHintType,?> hints) throw...

FILE: scanner/src/main/java/com/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder.java
  class MultiFinderPatternFinder (line 49) | final class MultiFinderPatternFinder extends FinderPatternFinder {
    class ModuleSizeComparator (line 80) | private static final class ModuleSizeComparator implements Comparator<...
      method compare (line 81) | @Override
    method MultiFinderPatternFinder (line 93) | MultiFinderPatternFinder(BitMatrix image) {
    method MultiFinderPatternFinder (line 97) | MultiFinderPatternFinder(BitMatrix image, ResultPointCallback resultPo...
    method selectMultipleBestPatterns (line 107) | private FinderPattern[][] selectMultipleBestPatterns() throws NotFound...
    method findMulti (line 232) | public FinderPatternInfo[] findMulti(Map<DecodeHintType,?> hints) thro...

FILE: scanner/src/main/java/com/google/zxing/oned/CodaBarReader.java
  class CodaBarReader (line 35) | public final class CodaBarReader extends OneDReader {
    method CodaBarReader (line 73) | public CodaBarReader() {
    method decodeRow (line 79) | @Override
    method validatePattern (line 164) | private void validatePattern(int start) throws NotFoundException {
    method setCounters (line 230) | private void setCounters(BitArray row) throws NotFoundException {
    method counterAppend (line 253) | private void counterAppend(int e) {
    method findStartPattern (line 263) | private int findStartPattern() throws NotFoundException {
    method arrayContains (line 281) | static boolean arrayContains(char[] array, char key) {
    method toNarrowWidePattern (line 293) | private int toNarrowWidePattern(int position) {

FILE: scanner/src/main/java/com/google/zxing/oned/CodaBarWriter.java
  class CodaBarWriter (line 24) | public final class CodaBarWriter extends OneDimensionalCodeWriter {
    method encode (line 31) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/Code128Reader.java
  class Code128Reader (line 37) | public final class Code128Reader extends OneDReader {
    method findStartPattern (line 169) | private static int[] findStartPattern(BitArray row) throws NotFoundExc...
    method decodeCode (line 214) | private static int decodeCode(BitArray row, int[] counters, int rowOff...
    method decodeRow (line 235) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/Code128Writer.java
  class Code128Writer (line 33) | public final class Code128Writer extends OneDimensionalCodeWriter {
    type CType (line 56) | private enum CType {
    method encode (line 63) | @Override
    method encode (line 75) | @Override
    method findCType (line 211) | private static CType findCType(CharSequence value, int start) {
    method chooseCode (line 233) | private static int chooseCode(CharSequence value, int start, int oldCo...

FILE: scanner/src/main/java/com/google/zxing/oned/Code39Reader.java
  class Code39Reader (line 37) | public final class Code39Reader extends OneDReader {
    method Code39Reader (line 65) | public Code39Reader() {
    method Code39Reader (line 76) | public Code39Reader(boolean usingCheckDigit) {
    method Code39Reader (line 90) | public Code39Reader(boolean usingCheckDigit, boolean extendedMode) {
    method decodeRow (line 97) | @Override
    method findAsteriskPattern (line 178) | private static int[] findAsteriskPattern(BitArray row, int[] counters)...
    method toNarrowWidePattern (line 214) | private static int toNarrowWidePattern(int[] counters) {
    method patternToChar (line 257) | private static char patternToChar(int pattern) throws NotFoundException {
    method decodeExtended (line 269) | private static String decodeExtended(CharSequence encoded) throws Form...

FILE: scanner/src/main/java/com/google/zxing/oned/Code39Writer.java
  class Code39Writer (line 31) | public final class Code39Writer extends OneDimensionalCodeWriter {
    method encode (line 33) | @Override
    method encode (line 45) | @Override
    method toIntArray (line 85) | private static void toIntArray(int a, int[] toReturn) {
    method tryToConvertToExtendedMode (line 92) | private static String tryToConvertToExtendedMode(String contents) {

FILE: scanner/src/main/java/com/google/zxing/oned/Code93Reader.java
  class Code93Reader (line 37) | public final class Code93Reader extends OneDReader {
    method Code93Reader (line 60) | public Code93Reader() {
    method decodeRow (line 65) | @Override
    method findAsteriskPattern (line 131) | private int[] findAsteriskPattern(BitArray row) throws NotFoundExcepti...
    method toPattern (line 165) | private static int toPattern(int[] counters) {
    method patternToChar (line 188) | private static char patternToChar(int pattern) throws NotFoundException {
    method decodeExtended (line 197) | private static String decodeExtended(CharSequence encoded) throws Form...
    method checkChecksums (line 275) | private static void checkChecksums(CharSequence result) throws Checksu...
    method checkOneChecksum (line 281) | private static void checkOneChecksum(CharSequence result, int checkPos...

FILE: scanner/src/main/java/com/google/zxing/oned/Code93Writer.java
  class Code93Writer (line 28) | public class Code93Writer extends OneDimensionalCodeWriter {
    method encode (line 29) | @Override
    method encode (line 45) | @Override
    method appendPattern (line 94) | @Deprecated
    method appendPattern (line 102) | private static int appendPattern(boolean[] target, int pos, int a) {
    method computeChecksumIndex (line 110) | private static int computeChecksumIndex(String contents, int maxWeight) {
    method convertToExtended (line 124) | static String convertToExtended(String contents) {

FILE: scanner/src/main/java/com/google/zxing/oned/EAN13Reader.java
  class EAN13Reader (line 30) | public final class EAN13Reader extends UPCEANReader {
    method EAN13Reader (line 67) | public EAN13Reader() {
    method decodeMiddle (line 71) | @Override
    method getBarcodeFormat (line 112) | @Override
    method determineFirstDigit (line 127) | private static void determineFirstDigit(StringBuilder resultString, in...

FILE: scanner/src/main/java/com/google/zxing/oned/EAN13Writer.java
  class EAN13Writer (line 32) | public final class EAN13Writer extends UPCEANWriter {
    method encode (line 40) | @Override
    method encode (line 53) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/EAN8Reader.java
  class EAN8Reader (line 28) | public final class EAN8Reader extends UPCEANReader {
    method EAN8Reader (line 32) | public EAN8Reader() {
    method decodeMiddle (line 36) | @Override
    method getBarcodeFormat (line 70) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/EAN8Writer.java
  class EAN8Writer (line 32) | public final class EAN8Writer extends UPCEANWriter {
    method encode (line 40) | @Override
    method encode (line 57) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/EANManufacturerOrgSupport.java
  class EANManufacturerOrgSupport (line 31) | final class EANManufacturerOrgSupport {
    method lookupCountryIdentifier (line 36) | String lookupCountryIdentifier(String productCode) {
    method add (line 54) | private void add(int[] range, String id) {
    method initIfNeeded (line 59) | private synchronized void initIfNeeded() {

FILE: scanner/src/main/java/com/google/zxing/oned/ITFReader.java
  class ITFReader (line 45) | public final class ITFReader extends OneDReader {
    method decodeRow (line 100) | @Override
    method decodeMiddle (line 156) | private static void decodeMiddle(BitArray row,
    method decodeStart (line 199) | private int[] decodeStart(BitArray row) throws NotFoundException {
    method validateQuietZone (line 228) | private void validateQuietZone(BitArray row, int startPattern) throws ...
    method skipWhiteSpace (line 254) | private static int skipWhiteSpace(BitArray row) throws NotFoundExcepti...
    method decodeEnd (line 271) | private int[] decodeEnd(BitArray row) throws NotFoundException {
    method findGuardPattern (line 313) | private static int[] findGuardPattern(BitArray row,
    method decodeDigit (line 354) | private static int decodeDigit(int[] counters) throws NotFoundException {

FILE: scanner/src/main/java/com/google/zxing/oned/ITFWriter.java
  class ITFWriter (line 31) | public final class ITFWriter extends OneDimensionalCodeWriter {
    method encode (line 54) | @Override
    method encode (line 67) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/MultiFormatOneDReader.java
  class MultiFormatOneDReader (line 37) | public final class MultiFormatOneDReader extends OneDReader {
    method MultiFormatOneDReader (line 43) | public MultiFormatOneDReader(Map<DecodeHintType,?> hints) {
    method decodeRow (line 92) | @Override
    method reset (line 107) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/MultiFormatUPCEANReader.java
  class MultiFormatUPCEANReader (line 38) | public final class MultiFormatUPCEANReader extends OneDReader {
    method MultiFormatUPCEANReader (line 44) | public MultiFormatUPCEANReader(Map<DecodeHintType,?> hints) {
    method decodeRow (line 71) | @Override
    method reset (line 118) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/OneDReader.java
  class OneDReader (line 42) | public abstract class OneDReader implements Reader {
    method decode (line 44) | @Override
    method decode (line 50) | @Override
    method reset (line 84) | @Override
    method doDecode (line 103) | private Result doDecode(BinaryBitmap image,
    method recordPattern (line 190) | protected static void recordPattern(BitArray row,
    method recordPatternInReverse (line 222) | protected static void recordPatternInReverse(BitArray row, int start, ...
    method patternMatchVariance (line 249) | protected static float patternMatchVariance(int[] counters,
    method decodeRow (line 293) | public abstract Result decodeRow(int rowNumber, BitArray row, Map<Deco...

FILE: scanner/src/main/java/com/google/zxing/oned/OneDimensionalCodeWriter.java
  class OneDimensionalCodeWriter (line 33) | public abstract class OneDimensionalCodeWriter implements Writer {
    method encode (line 36) | @Override
    method encode (line 49) | @Override
    method renderResult (line 76) | private static BitMatrix renderResult(boolean[] code, int width, int h...
    method checkNumeric (line 99) | protected static void checkNumeric(String contents) {
    method appendPattern (line 112) | protected static int appendPattern(boolean[] target, int pos, int[] pa...
    method getDefaultMargin (line 125) | public int getDefaultMargin() {
    method encode (line 138) | public abstract boolean[] encode(String contents);

FILE: scanner/src/main/java/com/google/zxing/oned/UPCAReader.java
  class UPCAReader (line 36) | public final class UPCAReader extends UPCEANReader {
    method decodeRow (line 40) | @Override
    method decodeRow (line 49) | @Override
    method decode (line 55) | @Override
    method decode (line 60) | @Override
    method getBarcodeFormat (line 66) | @Override
    method decodeMiddle (line 71) | @Override
    method maybeReturnResult (line 77) | private static Result maybeReturnResult(Result result) throws FormatEx...

FILE: scanner/src/main/java/com/google/zxing/oned/UPCAWriter.java
  class UPCAWriter (line 32) | public final class UPCAWriter implements Writer {
    method encode (line 36) | @Override
    method encode (line 42) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEANExtension2Support.java
  class UPCEANExtension2Support (line 32) | final class UPCEANExtension2Support {
    method decodeRow (line 37) | Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRang...
    method decodeMiddle (line 60) | private int decodeMiddle(BitArray row, int[] startRange, StringBuilder...
    method parseExtensionString (line 103) | private static Map<ResultMetadataType,Object> parseExtensionString(Str...

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEANExtension5Support.java
  class UPCEANExtension5Support (line 32) | final class UPCEANExtension5Support {
    method decodeRow (line 41) | Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRang...
    method decodeMiddle (line 64) | private int decodeMiddle(BitArray row, int[] startRange, StringBuilder...
    method extensionChecksum (line 103) | private static int extensionChecksum(CharSequence s) {
    method determineCheckDigit (line 117) | private static int determineCheckDigit(int lgPatternFound)
    method parseExtensionString (line 132) | private static Map<ResultMetadataType,Object> parseExtensionString(Str...
    method parseExtension5String (line 145) | private static String parseExtension5String(String raw) {

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEANExtensionSupport.java
  class UPCEANExtensionSupport (line 24) | final class UPCEANExtensionSupport {
    method decodeRow (line 31) | Result decodeRow(int rowNumber, BitArray row, int rowOffset) throws No...

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEANReader.java
  class UPCEANReader (line 42) | public abstract class UPCEANReader extends OneDReader {
    method UPCEANReader (line 101) | protected UPCEANReader() {
    method findStartGuardPattern (line 107) | static int[] findStartGuardPattern(BitArray row) throws NotFoundExcept...
    method decodeRow (line 128) | @Override
    method decodeRow (line 148) | public Result decodeRow(int rowNumber,
    method checkChecksum (line 251) | boolean checkChecksum(String s) throws FormatException {
    method checkStandardUPCEANChecksum (line 263) | static boolean checkStandardUPCEANChecksum(CharSequence s) throws Form...
    method getStandardUPCEANChecksum (line 272) | static int getStandardUPCEANChecksum(CharSequence s) throws FormatExce...
    method decodeEnd (line 293) | int[] decodeEnd(BitArray row, int endStart) throws NotFoundException {
    method findGuardPattern (line 297) | static int[] findGuardPattern(BitArray row,
    method findGuardPattern (line 315) | private static int[] findGuardPattern(BitArray row,
    method decodeDigit (line 361) | static int decodeDigit(BitArray row, int[] counters, int rowOffset, in...
    method getBarcodeFormat (line 387) | abstract BarcodeFormat getBarcodeFormat();
    method decodeMiddle (line 399) | protected abstract int decodeMiddle(BitArray row,

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEANWriter.java
  class UPCEANWriter (line 26) | public abstract class UPCEANWriter extends OneDimensionalCodeWriter {
    method getDefaultMargin (line 28) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEReader.java
  class UPCEReader (line 31) | public final class UPCEReader extends UPCEANReader {
    method UPCEReader (line 75) | public UPCEReader() {
    method decodeMiddle (line 79) | @Override
    method decodeEnd (line 108) | @Override
    method checkChecksum (line 113) | @Override
    method determineNumSysAndCheckDigit (line 118) | private static void determineNumSysAndCheckDigit(StringBuilder resultS...
    method getBarcodeFormat (line 133) | @Override
    method convertUPCEtoUPCA (line 144) | public static String convertUPCEtoUPCA(String upce) {

FILE: scanner/src/main/java/com/google/zxing/oned/UPCEWriter.java
  class UPCEWriter (line 32) | public final class UPCEWriter extends UPCEANWriter {
    method encode (line 38) | @Override
    method encode (line 51) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/AbstractRSSReader.java
  class AbstractRSSReader (line 27) | public abstract class AbstractRSSReader extends OneDReader {
    method AbstractRSSReader (line 42) | protected AbstractRSSReader() {
    method getDecodeFinderCounters (line 51) | protected final int[] getDecodeFinderCounters() {
    method getDataCharacterCounters (line 55) | protected final int[] getDataCharacterCounters() {
    method getOddRoundingErrors (line 59) | protected final float[] getOddRoundingErrors() {
    method getEvenRoundingErrors (line 63) | protected final float[] getEvenRoundingErrors() {
    method getOddCounts (line 67) | protected final int[] getOddCounts() {
    method getEvenCounts (line 71) | protected final int[] getEvenCounts() {
    method parseFinderValue (line 75) | protected static int parseFinderValue(int[] counters,
    method count (line 91) | @Deprecated
    method increment (line 96) | protected static void increment(int[] array, float[] errors) {
    method decrement (line 108) | protected static void decrement(int[] array, float[] errors) {
    method isFinderPattern (line 120) | protected static boolean isFinderPattern(int[] counters) {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/DataCharacter.java
  class DataCharacter (line 22) | public class DataCharacter {
    method DataCharacter (line 27) | public DataCharacter(int value, int checksumPortion) {
    method getValue (line 32) | public final int getValue() {
    method getChecksumPortion (line 36) | public final int getChecksumPortion() {
    method toString (line 40) | @Override
    method equals (line 45) | @Override
    method hashCode (line 54) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/FinderPattern.java
  class FinderPattern (line 24) | public final class FinderPattern {
    method FinderPattern (line 30) | public FinderPattern(int value, int[] startEnd, int start, int end, in...
    method getValue (line 39) | public int getValue() {
    method getStartEnd (line 43) | public int[] getStartEnd() {
    method getResultPoints (line 47) | public ResultPoint[] getResultPoints() {
    method equals (line 51) | @Override
    method hashCode (line 60) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/Pair.java
  class Pair (line 19) | final class Pair extends DataCharacter {
    method Pair (line 24) | Pair(int value, int checksumPortion, FinderPattern finderPattern) {
    method getFinderPattern (line 29) | FinderPattern getFinderPattern() {
    method getCount (line 33) | int getCount() {
    method incrementCount (line 37) | void incrementCount() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/RSS14Reader.java
  class RSS14Reader (line 36) | public final class RSS14Reader extends AbstractRSSReader {
    method RSS14Reader (line 60) | public RSS14Reader() {
    method decodeRow (line 65) | @Override
    method addOrTally (line 87) | private static void addOrTally(Collection<Pair> possiblePairs, Pair pa...
    method reset (line 104) | @Override
    method constructResult (line 110) | private static Result constructResult(Pair leftPair, Pair rightPair) {
    method checkChecksum (line 140) | private static boolean checkChecksum(Pair leftPair, Pair rightPair) {
    method decodePair (line 158) | private Pair decodePair(BitArray row, boolean right, int rowNumber, Ma...
    method decodeDataCharacter (line 185) | private DataCharacter decodeDataCharacter(BitArray row, FinderPattern ...
    method findFinderPattern (line 277) | private int[] findFinderPattern(BitArray row, boolean rightFinderPattern)
    method parseFoundFinderPattern (line 325) | private FinderPattern parseFoundFinderPattern(BitArray row, int rowNum...
    method adjustOddEvenCounts (line 351) | private void adjustOddEvenCounts(boolean outsideChar, int numModules) ...

FILE: scanner/src/main/java/com/google/zxing/oned/rss/RSSUtils.java
  class RSSUtils (line 20) | public final class RSSUtils {
    method RSSUtils (line 22) | private RSSUtils() {}
    method getRSSvalue (line 66) | public static int getRSSvalue(int[] widths, int maxWidth, boolean noNa...
    method combins (line 103) | private static int combins(int n, int r) {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java
  class BitArrayBuilder (line 37) | final class BitArrayBuilder {
    method BitArrayBuilder (line 39) | private BitArrayBuilder() {
    method buildBitArray (line 42) | static BitArray buildBitArray(List<ExpandedPair> pairs) {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/ExpandedPair.java
  class ExpandedPair (line 35) | final class ExpandedPair {
    method ExpandedPair (line 42) | ExpandedPair(DataCharacter leftChar,
    method mayBeLast (line 52) | boolean mayBeLast() {
    method getLeftChar (line 56) | DataCharacter getLeftChar() {
    method getRightChar (line 60) | DataCharacter getRightChar() {
    method getFinderPattern (line 64) | FinderPattern getFinderPattern() {
    method mustBeLast (line 68) | public boolean mustBeLast() {
    method toString (line 72) | @Override
    method equals (line 79) | @Override
    method equalsOrNull (line 91) | private static boolean equalsOrNull(Object o1, Object o2) {
    method hashCode (line 95) | @Override
    method hashNotNull (line 100) | private static int hashNotNull(Object o) {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/ExpandedRow.java
  class ExpandedRow (line 25) | final class ExpandedRow {
    method ExpandedRow (line 32) | ExpandedRow(List<ExpandedPair> pairs, int rowNumber, boolean wasRevers...
    method getPairs (line 38) | List<ExpandedPair> getPairs() {
    method getRowNumber (line 42) | int getRowNumber() {
    method isReversed (line 46) | boolean isReversed() {
    method isEquivalent (line 50) | boolean isEquivalent(List<ExpandedPair> otherPairs) {
    method toString (line 54) | @Override
    method equals (line 62) | @Override
    method hashCode (line 71) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java
  class RSSExpandedReader (line 53) | public final class RSSExpandedReader extends AbstractRSSReader {
    method decodeRow (line 121) | @Override
    method reset (line 140) | @Override
    method decodeRow2pairs (line 147) | List<ExpandedPair> decodeRow2pairs(int rowNumber, BitArray row) throws...
    method checkRows (line 184) | private List<ExpandedPair> checkRows(boolean reverse) {
    method checkRows (line 214) | private List<ExpandedPair> checkRows(List<ExpandedRow> collectedRows, ...
    method isValidSequence (line 246) | private static boolean isValidSequence(List<ExpandedPair> pairs) {
    method storeRow (line 268) | private void storeRow(int rowNumber, boolean wasReversed) {
    method removePartialRows (line 301) | private static void removePartialRows(List<ExpandedPair> pairs, List<E...
    method isPartialRow (line 329) | private static boolean isPartialRow(Iterable<ExpandedPair> pairs, Iter...
    method getRows (line 354) | List<ExpandedRow> getRows() {
    method constructResult (line 359) | static Result constructResult(List<ExpandedPair> pairs) throws NotFoun...
    method checkChecksum (line 376) | private boolean checkChecksum() {
    method getNextSecondBar (line 406) | private static int getNextSecondBar(BitArray row, int initialPos) {
    method retrieveNextPair (line 419) | ExpandedPair retrieveNextPair(BitArray row, List<ExpandedPair> previou...
    method findNextPair (line 458) | private void findNextPair(BitArray row, List<ExpandedPair> previousPai...
    method reverseCounters (line 528) | private static void reverseCounters(int [] counters) {
    method parseFoundFinderPattern (line 537) | private FinderPattern parseFoundFinderPattern(BitArray row, int rowNum...
    method decodeDataCharacter (line 580) | DataCharacter decodeDataCharacter(BitArray row,
    method isNotA1left (line 679) | private static boolean isNotA1left(FinderPattern pattern, boolean isOd...
    method adjustOddEvenCounts (line 684) | private void adjustOddEvenCounts(int numModules) throws NotFoundExcept...

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI013103decoder.java
  class AI013103decoder (line 34) | final class AI013103decoder extends AI013x0xDecoder {
    method AI013103decoder (line 36) | AI013103decoder(BitArray information) {
    method addWeightCode (line 40) | @Override
    method checkWeight (line 45) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01320xDecoder.java
  class AI01320xDecoder (line 34) | final class AI01320xDecoder extends AI013x0xDecoder {
    method AI01320xDecoder (line 36) | AI01320xDecoder(BitArray information) {
    method addWeightCode (line 40) | @Override
    method checkWeight (line 49) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01392xDecoder.java
  class AI01392xDecoder (line 36) | final class AI01392xDecoder extends AI01decoder {
    method AI01392xDecoder (line 41) | AI01392xDecoder(BitArray information) {
    method parseInformation (line 45) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01393xDecoder.java
  class AI01393xDecoder (line 35) | final class AI01393xDecoder extends AI01decoder {
    method AI01393xDecoder (line 41) | AI01393xDecoder(BitArray information) {
    method parseInformation (line 45) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI013x0x1xDecoder.java
  class AI013x0x1xDecoder (line 36) | final class AI013x0x1xDecoder extends AI01weightDecoder {
    method AI013x0x1xDecoder (line 45) | AI013x0x1xDecoder(BitArray information, String firstAIdigits, String d...
    method parseInformation (line 51) | @Override
    method encodeCompressedDate (line 66) | private void encodeCompressedDate(StringBuilder buf, int currentPos) {
    method addWeightCode (line 96) | @Override
    method checkWeight (line 104) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI013x0xDecoder.java
  class AI013x0xDecoder (line 35) | abstract class AI013x0xDecoder extends AI01weightDecoder {
    method AI013x0xDecoder (line 40) | AI013x0xDecoder(BitArray information) {
    method parseInformation (line 44) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01AndOtherAIs.java
  class AI01AndOtherAIs (line 37) | final class AI01AndOtherAIs extends AI01decoder {
    method AI01AndOtherAIs (line 41) | AI01AndOtherAIs(BitArray information) {
    method parseInformation (line 45) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01decoder.java
  class AI01decoder (line 35) | abstract class AI01decoder extends AbstractExpandedDecoder {
    method AI01decoder (line 39) | AI01decoder(BitArray information) {
    method encodeCompressedGtin (line 43) | final void encodeCompressedGtin(StringBuilder buf, int currentPos) {
    method encodeCompressedGtinWithoutAI (line 51) | final void encodeCompressedGtinWithoutAI(StringBuilder buf, int curren...
    method appendCheckDigit (line 66) | private static void appendCheckDigit(StringBuilder buf, int currentPos) {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01weightDecoder.java
  class AI01weightDecoder (line 34) | abstract class AI01weightDecoder extends AI01decoder {
    method AI01weightDecoder (line 36) | AI01weightDecoder(BitArray information) {
    method encodeCompressedWeight (line 40) | final void encodeCompressedWeight(StringBuilder buf, int currentPos, i...
    method addWeightCode (line 56) | protected abstract void addWeightCode(StringBuilder buf, int weight);
    method checkWeight (line 58) | protected abstract int checkWeight(int weight);

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AbstractExpandedDecoder.java
  class AbstractExpandedDecoder (line 37) | public abstract class AbstractExpandedDecoder {
    method AbstractExpandedDecoder (line 42) | AbstractExpandedDecoder(BitArray information) {
    method getInformation (line 47) | protected final BitArray getInformation() {
    method getGeneralDecoder (line 51) | protected final GeneralAppIdDecoder getGeneralDecoder() {
    method parseInformation (line 55) | public abstract String parseInformation() throws NotFoundException, Fo...
    method createDecoder (line 57) | public static AbstractExpandedDecoder createDecoder(BitArray informati...

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AnyAIDecoder.java
  class AnyAIDecoder (line 37) | final class AnyAIDecoder extends AbstractExpandedDecoder {
    method AnyAIDecoder (line 41) | AnyAIDecoder(BitArray information) {
    method parseInformation (line 45) | @Override

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/BlockParsedResult.java
  class BlockParsedResult (line 33) | final class BlockParsedResult {
    method BlockParsedResult (line 38) | BlockParsedResult(boolean finished) {
    method BlockParsedResult (line 42) | BlockParsedResult(DecodedInformation information, boolean finished) {
    method getDecodedInformation (line 47) | DecodedInformation getDecodedInformation() {
    method isFinished (line 51) | boolean isFinished() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/CurrentParsingState.java
  class CurrentParsingState (line 32) | final class CurrentParsingState {
    type State (line 37) | private enum State {
    method CurrentParsingState (line 43) | CurrentParsingState() {
    method getPosition (line 48) | int getPosition() {
    method setPosition (line 52) | void setPosition(int position) {
    method incrementPosition (line 56) | void incrementPosition(int delta) {
    method isAlpha (line 60) | boolean isAlpha() {
    method isNumeric (line 64) | boolean isNumeric() {
    method isIsoIec646 (line 68) | boolean isIsoIec646() {
    method setNumeric (line 72) | void setNumeric() {
    method setAlpha (line 76) | void setAlpha() {
    method setIsoIec646 (line 80) | void setIsoIec646() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/DecodedChar.java
  class DecodedChar (line 33) | final class DecodedChar extends DecodedObject {
    method DecodedChar (line 39) | DecodedChar(int newPosition, char value) {
    method getValue (line 44) | char getValue() {
    method isFNC1 (line 48) | boolean isFNC1() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/DecodedInformation.java
  class DecodedInformation (line 33) | final class DecodedInformation extends DecodedObject {
    method DecodedInformation (line 39) | DecodedInformation(int newPosition, String newString) {
    method DecodedInformation (line 46) | DecodedInformation(int newPosition, String newString, int remainingVal...
    method getNewString (line 53) | String getNewString() {
    method isRemaining (line 57) | boolean isRemaining() {
    method getRemainingValue (line 61) | int getRemainingValue() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/DecodedNumeric.java
  class DecodedNumeric (line 35) | final class DecodedNumeric extends DecodedObject {
    method DecodedNumeric (line 42) | DecodedNumeric(int newPosition, int firstDigit, int secondDigit) throw...
    method getFirstDigit (line 53) | int getFirstDigit() {
    method getSecondDigit (line 57) | int getSecondDigit() {
    method getValue (line 61) | int getValue() {
    method isFirstDigitFNC1 (line 65) | boolean isFirstDigitFNC1() {
    method isSecondDigitFNC1 (line 69) | boolean isSecondDigitFNC1() {
    method isAnyFNC1 (line 73) | boolean isAnyFNC1() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/DecodedObject.java
  class DecodedObject (line 32) | abstract class DecodedObject {
    method DecodedObject (line 36) | DecodedObject(int newPosition) {
    method getNewPosition (line 40) | final int getNewPosition() {

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/FieldParser.java
  class FieldParser (line 35) | final class FieldParser {
    method FieldParser (line 190) | private FieldParser() {
    method parseFieldsInGeneralPurpose (line 193) | static String parseFieldsInGeneralPurpose(String rawInformation) throw...
    method processFixedAI (line 258) | private static String processFixedAI(int aiSize, int fieldSize, String...
    method processVariableAI (line 276) | private static String processVariableAI(int aiSize, int variableFieldS...

FILE: scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/GeneralAppIdDecoder.java
  class GeneralAppIdDecoder (line 37) | final class GeneralAppIdDecoder {
    method GeneralAppIdDecoder (line 43) | GeneralAppIdDecoder(BitArray information) {
    method decodeAllCodes (line 47) | String decodeAllCodes(StringBuilder buff, int initialPosition) throws ...
    method isStillNumeric (line 71) | private boolean isStillNumeric(int pos) {
    method decodeNumeric (line 87) | private DecodedNumeric decodeNumeric(int pos) throws FormatException {
    method extractNumericValueFromBitArray (line 103) | int extractNumericValueFromBitArray(int pos, int bits) {
    method extractNumericValueFromBitArray (line 107) | static int extractNumericValueFromBitArray(BitArray information, int p...
    method decodeGeneralPurposeField (line 118) | DecodedInformation decodeGeneralPurposeField(int pos, String remaining...
    method parseBlocks (line 134) | private DecodedInformation parseBlocks() throws FormatException {
    method parseNumericBlock (line 160) | private BlockParsedResult parseNumericBlock() throws FormatException {
    method parseIsoIec646Block (line 190) | private BlockParsedResult parseIsoIec646Block() throws FormatException {
    method parseAlphaBlock (line 217) | private BlockParsedResult parseAlphaBlock() {
    method isStillIsoIec646 (line 245) | private boolean isStillIsoIec646(int pos) {
    method decodeIsoIec646 (line 273) | private DecodedChar decodeIsoIec646(int pos) throws FormatException {
    method isStillAlpha (line 365) | private boolean isStillAlpha(int pos) {
    method decodeAlphanumeric (line 384) | private DecodedChar decodeAlphanumeric(int pos) {
    method isAlphaTo646ToAlphaLatch (line 423) | private boolean isAlphaTo646ToAlphaLatch(int pos) {
    method isAlphaOr646ToNumericLatch (line 441) | private boolean isAlphaOr646ToNumericLatch(int pos) {
    method isNumericToAlphaNumericLatch (line 455) | private boolean isNumericToAlphaNumericLatch(int pos) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/PDF417Common.java
  class PDF417Common (line 27) | public final class PDF417Common {
    method PDF417Common (line 42) | private PDF417Common() {
    method getBitCountSum (line 50) | @Deprecated
    method toIntArray (line 55) | public static int[] toIntArray(Collection<Integer> list) {
    method getCodeword (line 71) | public static int getCodeword(int symbol) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/PDF417Reader.java
  class PDF417Reader (line 44) | public final class PDF417Reader implements Reader, MultipleBarcodeReader {
    method decode (line 55) | @Override
    method decode (line 60) | @Override
    method decodeMultiple (line 70) | @Override
    method decodeMultiple (line 75) | @Override
    method decode (line 84) | private static Result[] decode(BinaryBitmap image, Map<DecodeHintType,...
    method getMaxWidth (line 102) | private static int getMaxWidth(ResultPoint p1, ResultPoint p2) {
    method getMinWidth (line 109) | private static int getMinWidth(ResultPoint p1, ResultPoint p2) {
    method getMaxCodewordWidth (line 116) | private static int getMaxCodewordWidth(ResultPoint[] p) {
    method getMinCodewordWidth (line 124) | private static int getMinCodewordWidth(ResultPoint[] p) {
    method reset (line 132) | @Override

FILE: scanner/src/main/java/com/google/zxing/pdf417/PDF417ResultMetadata.java
  class PDF417ResultMetadata (line 22) | public final class PDF417ResultMetadata {
    method getSegmentIndex (line 41) | public int getSegmentIndex() {
    method setSegmentIndex (line 45) | public void setSegmentIndex(int segmentIndex) {
    method getFileId (line 54) | public String getFileId() {
    method setFileId (line 58) | public void setFileId(String fileId) {
    method getOptionalData (line 66) | @Deprecated
    method setOptionalData (line 75) | @Deprecated
    method isLastSegment (line 84) | public boolean isLastSegment() {
    method setLastSegment (line 88) | public void setLastSegment(boolean lastSegment) {
    method getSegmentCount (line 95) | public int getSegmentCount() {
    method setSegmentCount (line 99) | public void setSegmentCount(int segmentCount) {
    method getSender (line 103) | public String getSender() {
    method setSender (line 107) | public void setSender(String sender) {
    method getAddressee (line 111) | public String getAddressee() {
    method setAddressee (line 115) | public void setAddressee(String addressee) {
    method getFileName (line 124) | public String getFileName() {
    method setFileName (line 128) | public void setFileName(String fileName) {
    method getFileSize (line 137) | public long getFileSize() {
    method setFileSize (line 141) | public void setFileSize(long fileSize) {
    method getChecksum (line 150) | public int getChecksum() {
    method setChecksum (line 154) | public void setChecksum(int checksum) {
    method getTimestamp (line 163) | public long getTimestamp() {
    method setTimestamp (line 167) | public void setTimestamp(long timestamp) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/PDF417Writer.java
  class PDF417Writer (line 35) | public final class PDF417Writer implements Writer {
    method encode (line 47) | @Override
    method encode (line 90) | @Override
    method bitMatrixFromEncoder (line 101) | private static BitMatrix bitMatrixFromEncoder(PDF417 encoder,
    method bitMatrixFromBitArray (line 145) | private static BitMatrix bitMatrixFromBitArray(byte[][] input, int mar...
    method rotateArray (line 164) | private static byte[][] rotateArray(byte[][] bitarray) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/BarcodeMetadata.java
  class BarcodeMetadata (line 22) | final class BarcodeMetadata {
    method BarcodeMetadata (line 30) | BarcodeMetadata(int columnCount, int rowCountUpperPart, int rowCountLo...
    method getColumnCount (line 38) | int getColumnCount() {
    method getErrorCorrectionLevel (line 42) | int getErrorCorrectionLevel() {
    method getRowCount (line 46) | int getRowCount() {
    method getRowCountUpperPart (line 50) | int getRowCountUpperPart() {
    method getRowCountLowerPart (line 54) | int getRowCountLowerPart() {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/BarcodeValue.java
  class BarcodeValue (line 30) | final class BarcodeValue {
    method setValue (line 36) | void setValue(int value) {
    method getValue (line 49) | int[] getValue() {
    method getConfidence (line 64) | Integer getConfidence(int value) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/BoundingBox.java
  class BoundingBox (line 26) | final class BoundingBox {
    method BoundingBox (line 38) | BoundingBox(BitMatrix image,
    method BoundingBox (line 66) | BoundingBox(BoundingBox boundingBox) {
    method merge (line 78) | static BoundingBox merge(BoundingBox leftBox, BoundingBox rightBox) th...
    method addMissingRows (line 88) | BoundingBox addMissingRows(int missingStartRows, int missingEndRows, b...
    method getMinX (line 125) | int getMinX() {
    method getMaxX (line 129) | int getMaxX() {
    method getMinY (line 133) | int getMinY() {
    method getMaxY (line 137) | int getMaxY() {
    method getTopLeft (line 141) | ResultPoint getTopLeft() {
    method getTopRight (line 145) | ResultPoint getTopRight() {
    method getBottomLeft (line 149) | ResultPoint getBottomLeft() {
    method getBottomRight (line 153) | ResultPoint getBottomRight() {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/Codeword.java
  class Codeword (line 22) | final class Codeword {
    method Codeword (line 32) | Codeword(int startX, int endX, int bucket, int value) {
    method hasValidRowNumber (line 39) | boolean hasValidRowNumber() {
    method isValidRowNumber (line 43) | boolean isValidRowNumber(int rowNumber) {
    method setRowNumberAsRowIndicatorColumn (line 47) | void setRowNumberAsRowIndicatorColumn() {
    method getWidth (line 51) | int getWidth() {
    method getStartX (line 55) | int getStartX() {
    method getEndX (line 59) | int getEndX() {
    method getBucket (line 63) | int getBucket() {
    method getValue (line 67) | int getValue() {
    method getRowNumber (line 71) | int getRowNumber() {
    method setRowNumber (line 75) | void setRowNumber(int rowNumber) {
    method toString (line 79) | @Override

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/DecodedBitStreamParser.java
  class DecodedBitStreamParser (line 36) | final class DecodedBitStreamParser {
    type Mode (line 38) | private enum Mode {
    method DecodedBitStreamParser (line 100) | private DecodedBitStreamParser() {
    method decode (line 103) | static DecoderResult decode(int[] codewords, String ecLevel) throws Fo...
    method decodeMacroBlock (line 167) | @SuppressWarnings("deprecation")
    method textCompaction (line 266) | private static int textCompaction(int[] codewords, int codeIndex, Stri...
    method decodeTextCompaction (line 330) | private static void decodeTextCompaction(int[] textCompactionData,
    method byteCompaction (line 520) | private static int byteCompaction(int mode,
    method numericCompaction (line 629) | private static int numericCompaction(int[] codewords, int codeIndex, S...
    method decodeBase900toBase10 (line 711) | private static String decodeBase900toBase10(int[] codewords, int count...

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/DetectionResult.java
  class DetectionResult (line 26) | final class DetectionResult {
    method DetectionResult (line 35) | DetectionResult(BarcodeMetadata barcodeMetadata, BoundingBox boundingB...
    method getDetectionResultColumns (line 42) | DetectionResultColumn[] getDetectionResultColumns() {
    method adjustIndicatorColumnRowNumbers (line 54) | private void adjustIndicatorColumnRowNumbers(DetectionResultColumn det...
    method adjustRowNumbers (line 68) | private int adjustRowNumbers() {
    method adjustRowNumbersByRow (line 87) | private int adjustRowNumbersByRow() {
    method adjustRowNumbersFromBothRI (line 97) | private void adjustRowNumbersFromBothRI() {
    method adjustRowNumbersFromRRI (line 121) | private int adjustRowNumbersFromRRI() {
    method adjustRowNumbersFromLRI (line 146) | private int adjustRowNumbersFromLRI() {
    method adjustRowNumberIfValid (line 171) | private static int adjustRowNumberIfValid(int rowIndicatorRowNumber, i...
    method adjustRowNumbers (line 186) | private void adjustRowNumbers(int barcodeColumn, int codewordsRow, Cod...
    method adjustRowNumber (line 229) | private static boolean adjustRowNumber(Codeword codeword, Codeword oth...
    method getBarcodeColumnCount (line 240) | int getBarcodeColumnCount() {
    method getBarcodeRowCount (line 244) | int getBarcodeRowCount() {
    method getBarcodeECLevel (line 248) | int getBarcodeECLevel() {
    method setBoundingBox (line 252) | void setBoundingBox(BoundingBox boundingBox) {
    method getBoundingBox (line 256) | BoundingBox getBoundingBox() {
    method setDetectionResultColumn (line 260) | void setDetectionResultColumn(int barcodeColumn, DetectionResultColumn...
    method getDetectionResultColumn (line 264) | DetectionResultColumn getDetectionResultColumn(int barcodeColumn) {
    method toString (line 268) | @Override

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/DetectionResultColumn.java
  class DetectionResultColumn (line 24) | class DetectionResultColumn {
    method DetectionResultColumn (line 31) | DetectionResultColumn(BoundingBox boundingBox) {
    method getCodewordNearby (line 36) | final Codeword getCodewordNearby(int imageRow) {
    method imageRowToCodewordIndex (line 60) | final int imageRowToCodewordIndex(int imageRow) {
    method setCodeword (line 64) | final void setCodeword(int imageRow, Codeword codeword) {
    method getCodeword (line 68) | final Codeword getCodeword(int imageRow) {
    method getBoundingBox (line 72) | final BoundingBox getBoundingBox() {
    method getCodewords (line 76) | final Codeword[] getCodewords() {
    method toString (line 80) | @Override

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/DetectionResultRowIndicatorColumn.java
  class DetectionResultRowIndicatorColumn (line 25) | final class DetectionResultRowIndicatorColumn extends DetectionResultCol...
    method DetectionResultRowIndicatorColumn (line 29) | DetectionResultRowIndicatorColumn(BoundingBox boundingBox, boolean isL...
    method setRowNumbers (line 34) | private void setRowNumbers() {
    method adjustCompleteIndicatorColumnRowNumbers (line 46) | void adjustCompleteIndicatorColumnRowNumbers(BarcodeMetadata barcodeMe...
    method getRowHeights (line 113) | int[] getRowHeights() {
    method adjustIncompleteIndicatorColumnRowNumbers (line 136) | private void adjustIncompleteIndicatorColumnRowNumbers(BarcodeMetadata...
    method getBarcodeMetadata (line 175) | BarcodeMetadata getBarcodeMetadata() {
    method removeIncorrectCodewords (line 220) | private void removeIncorrectCodewords(Codeword[] codewords, BarcodeMet...
    method isLeft (line 258) | boolean isLeft() {
    method toString (line 262) | @Override

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/PDF417CodewordDecoder.java
  class PDF417CodewordDecoder (line 26) | final class PDF417CodewordDecoder {
    method PDF417CodewordDecoder (line 48) | private PDF417CodewordDecoder() {
    method getDecodedValue (line 51) | static int getDecodedValue(int[] moduleBitCount) {
    method sampleBitCounts (line 59) | private static int[] sampleBitCounts(int[] moduleBitCount) {
    method getDecodedCodewordValue (line 77) | private static int getDecodedCodewordValue(int[] moduleBitCount) {
    method getBitValue (line 82) | private static int getBitValue(int[] moduleBitCount) {
    method getClosestDecodedValue (line 92) | private static int getClosestDecodedValue(int[] moduleBitCount) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/PDF417ScanningDecoder.java
  class PDF417ScanningDecoder (line 37) | public final class PDF417ScanningDecoder {
    method PDF417ScanningDecoder (line 45) | private PDF417ScanningDecoder() {
    method decode (line 52) | public static DecoderResult decode(BitMatrix image,
    method merge (line 127) | private static DetectionResult merge(DetectionResultRowIndicatorColumn...
    method adjustBoundingBox (line 142) | private static BoundingBox adjustBoundingBox(DetectionResultRowIndicat...
    method getMax (line 177) | private static int getMax(int[] values) {
    method getBarcodeMetadata (line 185) | private static BarcodeMetadata getBarcodeMetadata(DetectionResultRowIn...
    method getRowIndicatorColumn (line 206) | private static DetectionResultRowIndicatorColumn getRowIndicatorColumn...
    method adjustCodewordCount (line 234) | private static void adjustCodewordCount(DetectionResult detectionResul...
    method createDecoderResult (line 252) | private static DecoderResult createDecoderResult(DetectionResult detec...
    method createDecoderResultFromAmbiguousValues (line 295) | private static DecoderResult createDecoderResultFromAmbiguousValues(in...
    method createBarcodeMatrix (line 331) | private static BarcodeValue[][] createBarcodeMatrix(DetectionResult de...
    method isValidBarcodeColumn (line 361) | private static boolean isValidBarcodeColumn(DetectionResult detectionR...
    method getStartColumn (line 365) | private static int getStartColumn(DetectionResult detectionResult,
    method detectCodeword (line 404) | private static Codeword detectCodeword(BitMatrix image,
    method getModuleBitCount (line 462) | private static int[] getModuleBitCount(BitMatrix image,
    method getNumberOfECCodeWords (line 491) | private static int getNumberOfECCodeWords(int barcodeECLevel) {
    method adjustCodewordStartColumn (line 495) | private static int adjustCodewordStartColumn(BitMatrix image,
    method checkCodewordSkew (line 518) | private static boolean checkCodewordSkew(int codewordSize, int minCode...
    method decodeCodewords (line 523) | private static DecoderResult decodeCodewords(int[] codewords, int ecLe...
    method correctErrors (line 549) | private static int correctErrors(int[] codewords, int[] erasures, int ...
    method verifyCodewordCount (line 563) | private static void verifyCodewordCount(int[] codewords, int numECCode...
    method getBitCountForCodeword (line 586) | private static int[] getBitCountForCodeword(int codeword) {
    method getCodewordBucketNumber (line 604) | private static int getCodewordBucketNumber(int codeword) {
    method getCodewordBucketNumber (line 608) | private static int getCodewordBucketNumber(int[] moduleBitCount) {
    method toString (line 612) | public static String toString(BarcodeValue[][] barcodeMatrix) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/ec/ErrorCorrection.java
  class ErrorCorrection (line 30) | public final class ErrorCorrection {
    method ErrorCorrection (line 34) | public ErrorCorrection() {
    method decode (line 45) | public int decode(int[] received,
    method runEuclideanAlgorithm (line 97) | private ModulusPoly[] runEuclideanAlgorithm(ModulusPoly a, ModulusPoly...
    method findErrorLocations (line 148) | private int[] findErrorLocations(ModulusPoly errorLocator) throws Chec...
    method findErrorMagnitudes (line 165) | private int[] findErrorMagnitudes(ModulusPoly errorEvaluator,

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/ec/ModulusGF.java
  class ModulusGF (line 27) | public final class ModulusGF {
    method ModulusGF (line 37) | private ModulusGF(int modulus, int generator) {
    method getZero (line 55) | ModulusPoly getZero() {
    method getOne (line 59) | ModulusPoly getOne() {
    method buildMonomial (line 63) | ModulusPoly buildMonomial(int degree, int coefficient) {
    method add (line 75) | int add(int a, int b) {
    method subtract (line 79) | int subtract(int a, int b) {
    method exp (line 83) | int exp(int a) {
    method log (line 87) | int log(int a) {
    method inverse (line 94) | int inverse(int a) {
    method multiply (line 101) | int multiply(int a, int b) {
    method getSize (line 108) | int getSize() {

FILE: scanner/src/main/java/com/google/zxing/pdf417/decoder/ec/ModulusPoly.java
  class ModulusPoly (line 23) | final class ModulusPoly {
    method ModulusPoly (line 28) | ModulusPoly(ModulusGF field, int[] coefficients) {
    method getCoefficients (line 55) | int[] getCoefficients() {
    method getDegree (line 62) | int getDegree() {
    method isZero (line 69) | boolean isZero() {
    method getCoefficient (line 76) | int getCoefficient(int degree) {
    method evaluateAt (line 83) | int evaluateAt(int a) {
    method add (line 104) | ModulusPoly add(ModulusPoly other) {
    method subtract (line 134) | ModulusPoly subtract(ModulusPoly other) {
    method multiply (line 144) | ModulusPoly multiply(ModulusPoly other) {
    method negative (line 165) | ModulusPoly negative() {
    method multiply (line 174) | ModulusPoly multiply(int scalar) {
    method multiplyByMonomial (line 189) | ModulusPoly multiplyByMonomial(int degree, int coefficient) {
    method toString (line 232) | @Override

FILE: scanner/src/main/java/com/google/zxing/pdf417/detector/Detector.java
  class Detector (line 38) | public final class Detector {
    method Detector (line 60) | private Detector() {
    method detect (line 73) | public static PDF417DetectorResult detect(BinaryBitmap image, Map<Deco...
    method detect (line 97) | private static List<ResultPoint[]> detect(boolean multiple, BitMatrix ...
    method findVertices (line 158) | private static ResultPoint[] findVertices(BitMatrix matrix, int startR...
    method copyToResult (line 175) | private static void copyToResult(ResultPoint[] result, ResultPoint[] t...
    method findRowsWithPattern (line 181) | private static ResultPoint[] findRowsWithPattern(BitMatrix matrix,
    method findGuardPattern (line 252) | private static int[] findGuardPattern(BitMatrix matrix,
    method patternMatchVariance (line 309) | private static float patternMatchVariance(int[] counters, int[] patter...

FILE: scanner/src/main/java/com/google/zxing/pdf417/detector/PDF417DetectorResult.java
  class PDF417DetectorResult (line 27) | public final class PDF417DetectorResult {
    method PDF417DetectorResult (line 32) | public PDF417DetectorResult(BitMatrix bits, List<ResultPoint[]> points) {
    method getBits (line 37) | public BitMatrix getBits() {
    method getPoints (line 41) | public List<ResultPoint[]> getPoints() {

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/BarcodeMatrix.java
  class BarcodeMatrix (line 24) | public final class BarcodeMatrix {
    method BarcodeMatrix (line 35) | BarcodeMatrix(int height, int width) {
    method set (line 46) | void set(int x, int y, byte value) {
    method startRow (line 56) | void startRow() {
    method getCurrentRow (line 60) | BarcodeRow getCurrentRow() {
    method getMatrix (line 64) | public byte[][] getMatrix() {
    method getScaledMatrix (line 74) | public byte[][] getScaledMatrix(int xScale, int yScale) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/BarcodeRow.java
  class BarcodeRow (line 22) | final class BarcodeRow {
    method BarcodeRow (line 31) | BarcodeRow(int width) {
    method set (line 42) | void set(int x, byte value) {
    method set (line 52) | private void set(int x, boolean black) {
    method addBar (line 60) | void addBar(boolean black, int width) {
    method getScaledRow (line 78) | byte[] getScaledRow(int scale) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/Compaction.java
  type Compaction (line 22) | public enum Compaction {

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/Dimensions.java
  class Dimensions (line 24) | public final class Dimensions {
    method Dimensions (line 31) | public Dimensions(int minCols, int maxCols, int minRows, int maxRows) {
    method getMinCols (line 38) | public int getMinCols() {
    method getMaxCols (line 42) | public int getMaxCols() {
    method getMinRows (line 46) | public int getMinRows() {
    method getMaxRows (line 50) | public int getMaxRows() {

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/PDF417.java
  class PDF417 (line 30) | public final class PDF417 {
    method PDF417 (line 524) | public PDF417() {
    method PDF417 (line 528) | public PDF417(boolean compact) {
    method getBarcodeMatrix (line 538) | public BarcodeMatrix getBarcodeMatrix() {
    method calculateNumberOfRows (line 552) | private static int calculateNumberOfRows(int m, int k, int c) {
    method getNumberOfPadCodewords (line 571) | private static int getNumberOfPadCodewords(int m, int k, int c, int r) {
    method encodeChar (line 576) | private static void encodeChar(int pattern, int len, BarcodeRow logic) {
    method encodeLowLevel (line 595) | private void encodeLowLevel(CharSequence fullCodewords,
    method generateBarcodeLogic (line 645) | public void generateBarcodeLogic(String msg, int errorCorrectionLevel)...
    method determineDimensions (line 689) | private int[] determineDimensions(int sourceCodeWords, int errorCorrec...
    method setDimensions (line 739) | public void setDimensions(int maxCols, int minCols, int maxRows, int m...
    method setCompaction (line 749) | public void setCompaction(Compaction compaction) {
    method setCompact (line 756) | public void setCompact(boolean compact) {
    method setEncoding (line 763) | public void setEncoding(Charset encoding) {

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/PDF417ErrorCorrection.java
  class PDF417ErrorCorrection (line 29) | final class PDF417ErrorCorrection {
    method PDF417ErrorCorrection (line 127) | private PDF417ErrorCorrection() {
    method getErrorCorrectionCodewordCount (line 137) | static int getErrorCorrectionCodewordCount(int errorCorrectionLevel) {
    method getRecommendedMinimumErrorCorrectionLevel (line 151) | static int getRecommendedMinimumErrorCorrectionLevel(int n) throws Wri...
    method generateErrorCorrection (line 177) | static String generateErrorCorrection(CharSequence dataCodewords, int ...

FILE: scanner/src/main/java/com/google/zxing/pdf417/encoder/PDF417HighLevelEncoder.java
  class PDF417HighLevelEncoder (line 36) | final class PDF417HighLevelEncoder {
    method PDF417HighLevelEncoder (line 132) | private PDF417HighLevelEncoder() {
    method encodeHighLevel (line 164) | static String encodeHighLevel(String msg, Compaction compaction, Chars...
    method encodeText (line 251) | private static int encodeText(CharSequence msg,
    method encodeBinary (line 377) | private static void encodeBinary(byte[] bytes,
    method encodeNumeric (line 419) | private static void encodeNumeric(String msg, int startpos, int count,...
    method isDigit (line 443) | private static boolean isDigit(char ch) {
    method isAlphaUpper (line 447) | private static boolean isAlphaUpper(char ch) {
    method isAlphaLower (line 451) | private static boolean isAlphaLower(char ch) {
    method isMixed (line 455) | private static boolean isMixed(char ch) {
    method isPunctuation (line 459) | private static boolean isPunctuation(char ch) {
    method isText (line 463) | private static boolean isText(char ch) {
    method determineConsecutiveDigitCount (line 474) | private static int determineConsecutiveDigitCount(CharSequence msg, in...
    method determineConsecutiveTextCount (line 498) | private static int determineConsecutiveTextCount(CharSequence msg, int...
    method determineConsecutiveBinaryCount (line 537) | private static int determineConsecutiveBinaryCount(String msg, int sta...
    method encodingECI (line 568) | private static void encodingECI(int eci, StringBuilder sb) throws Writ...

FILE: scanner/src/main/java/com/google/zxing/qrcode/QRCodeReader.java
  class QRCodeReader (line 47) | public class QRCodeReader implements Reader {
    method getDecoder (line 53) | protected final Decoder getDecoder() {
    method decode (line 65) | @Override
    method zoomCamera (line 74) | private boolean zoomCamera(Camera camera, ResultPoint[] p, Rect frameR...
    method getQRCodeWidth (line 101) | private int getQRCodeWidth(ResultPoint[] p) {
    method decode (line 106) | @Override
    method reset (line 144) | @Override
    method extractPureBits (line 157) | private static BitMatrix extractPureBits(BitMatrix image) throws NotFo...
    method moduleSize (line 238) | private static float moduleSize(int[] leftTopBlack, BitMatrix image) t...

FILE: scanner/src/main/java/com/google/zxing/qrcode/QRCodeWriter.java
  class QRCodeWriter (line 36) | public final class QRCodeWriter implements Writer {
    method encode (line 40) | @Override
    method encode (line 47) | @Override
    method renderResult (line 84) | private static BitMatrix renderResult(QRCode code, int width, int heig...

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/BitMatrixParser.java
  class BitMatrixParser (line 25) | final class BitMatrixParser {
    method BitMatrixParser (line 36) | BitMatrixParser(BitMatrix bitMatrix) throws FormatException {
    method readFormatInformation (line 51) | FormatInformation readFormatInformation() throws FormatException {
    method readVersion (line 96) | Version readVersion() throws FormatException {
    method copyBit (line 140) | private int copyBit(int i, int j, int versionBits) {
    method readCodewords (line 153) | byte[] readCodewords() throws FormatException {
    method remask (line 210) | void remask() {
    method setMirror (line 227) | void setMirror(boolean mirror) {
    method mirror (line 234) | void mirror() {

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/DataBlock.java
  class DataBlock (line 26) | final class DataBlock {
    method DataBlock (line 31) | private DataBlock(int numDataCodewords, byte[] codewords) {
    method getDataBlocks (line 47) | static DataBlock[] getDataBlocks(byte[] rawCodewords,
    method getNumDataCodewords (line 114) | int getNumDataCodewords() {
    method getCodewords (line 118) | byte[] getCodewords() {

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/DataMask.java
  type DataMask (line 32) | enum DataMask {
    method isMasked (line 40) | @Override
    method isMasked (line 50) | @Override
    method isMasked (line 60) | @Override
    method isMasked (line 70) | @Override
    method isMasked (line 80) | @Override
    method isMasked (line 91) | @Override
    method isMasked (line 102) | @Override
    method isMasked (line 113) | @Override
    method unmaskBitMatrix (line 129) | final void unmaskBitMatrix(BitMatrix bits, int dimension) {
    method isMasked (line 139) | abstract boolean isMasked(int i, int j);

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java
  class DecodedBitStreamParser (line 40) | final class DecodedBitStreamParser {
    method DecodedBitStreamParser (line 49) | private DecodedBitStreamParser() {
    method decode (line 52) | static DecoderResult decode(byte[] bytes,
    method decodeHanziSegment (line 147) | private static void decodeHanziSegment(BitSource bits,
    method decodeKanjiSegment (line 183) | private static void decodeKanjiSegment(BitSource bits,
    method decodeByteSegment (line 219) | private static void decodeByteSegment(BitSource bits,
    method toAlphaNumericChar (line 253) | private static char toAlphaNumericChar(int value) throws FormatExcepti...
    method decodeAlphanumericSegment (line 260) | private static void decodeAlphanumericSegment(BitSource bits,
    method decodeNumericSegment (line 299) | private static void decodeNumericSegment(BitSource bits,
    method parseECIValue (line 341) | private static int parseECIValue(BitSource bits) throws FormatException {

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/Decoder.java
  class Decoder (line 36) | public final class Decoder {
    method Decoder (line 40) | public Decoder() {
    method decode (line 44) | public DecoderResult decode(boolean[][] image) throws ChecksumExceptio...
    method decode (line 58) | public DecoderResult decode(boolean[][] image, Map<DecodeHintType,?> h...
    method decode (line 63) | public DecoderResult decode(BitMatrix bits) throws ChecksumException, ...
    method decode (line 76) | public DecoderResult decode(BitMatrix bits, Map<DecodeHintType,?> hints)
    method decode (line 130) | private DecoderResult decode(BitMatrixParser parser, Map<DecodeHintTyp...
    method correctErrors (line 170) | private void correctErrors(byte[] codewordBytes, int numDataCodewords)...

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java
  type ErrorCorrectionLevel (line 25) | public enum ErrorCorrectionLevel {
    method ErrorCorrectionLevel (line 40) | ErrorCorrectionLevel(int bits) {
    method getBits (line 44) | public int getBits() {
    method forBits (line 52) | public static ErrorCorrectionLevel forBits(int bits) {

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/FormatInformation.java
  class FormatInformation (line 27) | final class FormatInformation {
    method FormatInformation (line 72) | private FormatInformation(int formatInfo) {
    method numBitsDiffering (line 79) | static int numBitsDiffering(int a, int b) {
    method decodeFormatInformation (line 90) | static FormatInformation decodeFormatInformation(int maskedFormatInfo1...
    method doDecodeFormatInformation (line 102) | private static FormatInformation doDecodeFormatInformation(int maskedF...
    method getErrorCorrectionLevel (line 134) | ErrorCorrectionLevel getErrorCorrectionLevel() {
    method getDataMask (line 138) | byte getDataMask() {
    method hashCode (line 142) | @Override
    method equals (line 147) | @Override

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/Mode.java
  type Mode (line 25) | public enum Mode {
    method Mode (line 42) | Mode(int[] characterCountBitsForVersions, int bits) {
    method forBits (line 52) | public static Mode forBits(int bits) {
    method getCharacterCountBits (line 85) | public int getCharacterCountBits(Version version) {
    method getBits (line 98) | public int getBits() {

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/QRCodeDecoderMetaData.java
  class QRCodeDecoderMetaData (line 27) | public final class QRCodeDecoderMetaData {
    method QRCodeDecoderMetaData (line 31) | QRCodeDecoderMetaData(boolean mirrored) {
    method isMirrored (line 38) | public boolean isMirrored() {
    method applyMirroredCorrection (line 47) | public void applyMirroredCorrection(ResultPoint[] points) {

FILE: scanner/src/main/java/com/google/zxing/qrcode/decoder/Version.java
  class Version (line 27) | public final class Version {
    method Version (line 50) | private Version(int versionNumber,
    method getVersionNumber (line 65) | public int getVersionNumber() {
    method getAlignmentPatternCenters (line 69) | public int[] getAlignmentPatternCenters() {
    method getTotalCodewords (line 73) | public int getTotalCodewords() {
    method getDimensionForVersion (line 77) | public int getDimensionForVersion() {
    method getECBlocksForLevel (line 81) | public ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel) {
    method getProvisionalVersionForDimension (line 92) | public static Version getProvisionalVersionForDimension(int dimension)...
    method getVersionForNumber (line 103) | public static Version getVersionForNumber(int versionNumber) {
    method decodeVersionInformation (line 110) | static Version decodeVersionInformation(int versionBits) {
    method buildFunctionPattern (line 139) | BitMatrix buildFunctionPattern() {
    class ECBlocks (line 184) | public static final class ECBlocks {
      method ECBlocks (line 188) | ECBlocks(int ecCodewordsPerBlock, ECB... ecBlocks) {
      method getECCodewordsPerBlock (line 193) | public int getECCodewordsPerBlock() {
      method getNumBlocks (line 197) | public int getNumBlocks() {
      method getTotalECCodewords (line 205) | public int getTotalECCodewords() {
      method getECBlocks (line 209) | public ECB[] getECBlocks() {
    class ECB (line 219) | public static final class ECB {
      method ECB (line 223) | ECB(int count, int dataCodewords) {
      method getCount (line 228) | public int getCount() {
      method getDataCodewords (line 232) | public int getDataCodewords() {
    method toString (line 237) | @Override
    method buildVersions (line 245) | private static Version[] buildVersions() {

FILE: scanner/src/main/java/com/google/zxing/qrcode/detector/AlignmentPattern.java
  class AlignmentPattern (line 27) | public final class AlignmentPattern extends ResultPoint {
    method AlignmentPattern (line 31) | AlignmentPattern(float posX, float posY, float estimatedModuleSize) {
    method aboutEquals (line 40) | boolean aboutEquals(float moduleSize, float i, float j) {
    method combineEstimate (line 52) | AlignmentPattern combineEstimate(float i, float j, float newModuleSize) {

FILE: scanner/src/main/java/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java
  class AlignmentPatternFinder (line 40) | final class AlignmentPatternFinder {
    method AlignmentPatternFinder (line 62) | AlignmentPatternFinder(BitMatrix image,
    method find (line 87) | AlignmentPattern find() throws NotFoundException {
    method centerFromEnd (line 160) | private static float centerFromEnd(int[] stateCount, int end) {
    method foundPatternCross (line 169) | private boolean foundPatternCross(int[] stateCount) {
    method crossCheckVertical (line 191) | private float crossCheckVertical(int startI, int centerJ, int maxCount,
    method handlePossibleCenter (line 255) | private AlignmentPattern handlePossibleCenter(int[] stateCount, int i,...

FILE: scanner/src/main/java/com/google/zxing/qrcode/detector/Detector.java
  class Detector (line 39) | public class Detector {
    method Detector (line 44) | public Detector(BitMatrix image) {
    method getImage (line 48) | protected final BitMatrix getImage() {
    method getResultPointCallback (line 52) | protected final ResultPointCallback getResultPointCallback() {
    method detect (line 63) | public DetectorResult detect() throws NotFoundException, FormatExcepti...
    method detect (line 75) | public final DetectorResult detect(Map<DecodeHintType,?> hints) throws...
    method processFinderPatternInfo (line 86) | protected final DetectorResult processFinderPatternInfo(FinderPatternI...
    method createTransform (line 144) | private static PerspectiveTransform createTransform(ResultPoint topLeft,
    method sampleGrid (line 186) | private static BitMatrix sampleGrid(BitMatrix image,
    method computeDimension (line 198) | private static int computeDimension(ResultPoint topLeft,
    method calculateModuleSize (line 228) | protected final float calculateModuleSize(ResultPoint topLeft,
    method calculateModuleSizeOneWay (line 241) | private float calculateModuleSizeOneWay(ResultPoint pattern, ResultPoi...
    method sizeOfBlackWhiteBlackRunBothWays (line 266) | private float sizeOfBlackWhiteBlackRunBothWays(int fromX, int fromY, i...
    method sizeOfBlackWhiteBlackRun (line 306) | private float sizeOfBlackWhiteBlackRun(int fromX, int fromY, int toX, ...
    method findAlignmentInRegion (line 373) | protected final AlignmentPattern findAlignmentInRegion(float overallEs...

FILE: scanner/src/main/java/com/google/zxing/qrcode/detector/FinderPattern.java
  class FinderPattern (line 28) | public final class FinderPattern extends ResultPoint {
    method FinderPattern (line 33) | FinderPattern(float posX, float posY, float estimatedModuleSize) {
    method FinderPattern (line 37) | private FinderPattern(float posX, float posY, float estimatedModuleSiz...
    method getEstimatedModuleSize (line 43) | public float getEstimatedModuleSize() {
    method getCount (line 47) | int getCount() {
    method aboutEquals (line 61) | boolean aboutEquals(float moduleSize, float i, float j) {
    method combineEstimate (line 74) | FinderPattern combineEstimate(float i, float j, float newModuleSize) {

FILE: scanner/src/main/java/com/google/zxing/qrcode/detector/FinderPatternFinder.java
  class FinderPatternFinder (line 40) | public class FinderPatternFinder {
    method FinderPatternFinder (line 57) | public FinderPatternFinder(BitMatrix image) {
    method FinderPatternFinder (line 61) | public FinderPatternFinder(BitMatrix image, ResultPointCallback result...
    method getImage (line 68) | protected final BitMatrix getImage() {
    method getPossibleCenters (line 72) | protected final List<FinderPattern> getPossibleCenters() {
    method find (line 76) | final FinderPatternInfo find(Map<DecodeHintType,?> hints) throws NotFo...
    method centerFromEnd (line 173) | private static float centerFromEnd(int[] stateCount, int end) {
    method foundPatternCross (line 182) | protected static boolean foundPatternCross(int[] stateCount) {
    method foundPatternDiagonal (line 210) | protected static boolean foundPatternDiagonal(int[] stateCount) {
    method getCrossCheckStateCount (line 233) | private int[] getCrossCheckStateCount() {
    method clearCounts (line 238) | protected final void clearCounts(int[] counts) {
    method shiftCounts2 (line 244) | protected final void shiftCounts2(int[] stateCount) {
    method crossCheckDiagonal (line 261) | private boolean crossCheckDiagonal(int centerI, int centerJ) {
    method crossCheckVertical (line 332) | private float crossCheckVertical(int startI, int centerJ, int maxCount,
    method crossCheckHorizontal (line 404) | private float crossCheckHorizontal(int startJ, int centerI, int maxCount,
    method handlePossibleCenter (line 477) | @Deprecated
    method handlePossibleCenter (line 499) | protected final boolean handlePossibleCenter(int[] stateCount, int i, ...
    method findRowSkip (line 538) | private int findRowSkip() {
    method haveMultiplyConfirmedCenters (line 568) | private boolean haveMultiplyConfirmedCenters() {
    method selectBestPatterns (line 599) | private FinderPattern[] selectBestPatterns() throws NotFoundException {
    class FurthestFromAverageComparator (line 658) | private static final class FurthestFromAverageComparator implements Co...
      method FurthestFromAverageComparator (line 660) | private FurthestFromAverageComparator(float f) {
      method compare (line 663) | @Override
    class CenterComparator (line 673) | private static final class CenterComparator implements Comparator<Find...
      method CenterComparator (line 675) | private CenterComparator(float f) {
      method compare (line 678) | @Override

FILE: scanner/src/main/java/com/google/zxing/qrcode/detector/FinderPatternInfo.java
  class FinderPatternInfo (line 25) | public final class FinderPatternInfo {
    method FinderPatternInfo (line 31) | public FinderPatternInfo(FinderPattern[] patternCenters) {
    method getBottomLeft (line 37) | public FinderPattern getBottomLeft() {
    method getTopLeft (line 41) | public FinderPattern getTopLeft() {
    method getTopRight (line 45) | public FinderPattern getTopRight() {

FILE: scanner/src/main/java/com/google/zxing/qrcode/encoder/BlockPair.java
  class BlockPair (line 19) | final class BlockPair {
    method BlockPair (line 24) | BlockPair(byte[] data, byte[] errorCorrection) {
    method getDataBytes (line 29) | public byte[] getDataBytes() {
    method getErrorCorrectionBytes (line 33) | public byte[] getErrorCorrectionBytes() {

FILE: scanner/src/main/java/com/google/zxing/qrcode/encoder/ByteMatrix.java
  class ByteMatrix (line 27) | public final class ByteMatrix {
    method ByteMatrix (line 33) | public ByteMatrix(int width, int height) {
    method getHeight (line 39) | public int getHeight() {
    method getWidth (line 43) | public int getWidth() {
    method get (line 47) | public byte get(int x, int y) {
    method getArray (line 54) | public byte[][] getArray() {
    method set (line 58) | public void set(int x, int y, byte value) {
    method set (line 62) | public void set(int x, int y, int value) {
    method set (line 66) | public void set(int x, int y, boolean value) {
    method clear (line 70) | public void clear(byte value) {
    method toString (line 76) | @Override

FILE: scanner/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java
  class Encoder (line 38) | public final class Encoder {
    method Encoder (line 52) | private Encoder() {
    method calculateMaskPenalty (line 57) | private static int calculateMaskPenalty(ByteMatrix matrix) {
    method encode (line 71) | public static QRCode encode(String content, ErrorCorrectionLevel ecLev...
    method encode (line 75) | public static QRCode encode(String content,
    method recommendVersion (line 173) | private static Version recommendVersion(ErrorCorrectionLevel ecLevel,
    method calculateBitsNeeded (line 188) | private static int calculateBitsNeeded(Mode mode,
    method getAlphanumericCode (line 199) | static int getAlphanumericCode(int code) {
    method chooseMode (line 206) | public static Mode chooseMode(String content) {
    method chooseMode (line 214) | private static Mode chooseMode(String content, String encoding) {
    method isOnlyDoubleByteKanji (line 240) | private static boolean isOnlyDoubleByteKanji(String content) {
    method chooseMaskPattern (line 260) | private static int chooseMaskPattern(BitArray bits,
    method chooseVersion (line 279) | private static Version chooseVersion(int numInputBits, ErrorCorrection...
    method willFit (line 293) | private static boolean willFit(int numInputBits, Version version, Erro...
    method terminateBits (line 309) | static void terminateBits(int numDataBytes, BitArray bits) throws Writ...
    method getNumDataBytesAndNumECBytesForBlockID (line 341) | static void getNumDataBytesAndNumECBytesForBlockID(int numTotalBytes,
    method interleaveWithECBytes (line 397) | static BitArray interleaveWithECBytes(BitArray bits,
    method generateECBytes (line 465) | static byte[] generateECBytes(byte[] dataBytes, int numEcBytesInBlock) {
    method appendModeInfo (line 483) | static void appendModeInfo(Mode mode, BitArray bits) {
    method appendLengthInfo (line 491) | static void appendLengthInfo(int numLetters, Version version, Mode mod...
    method appendBytes (line 502) | static void appendBytes(String content,
    method appendNumericBytes (line 524) | static void appendNumericBytes(CharSequence content, BitArray bits) {
    method appendAlphanumericBytes (line 548) | static void appendAlphanumericBytes(CharSequence content, BitArray bit...
    method append8BitBytes (line 572) | static void append8BitBytes(String content, BitArray bits, String enco...
    method appendKanjiBytes (line 585) | static void appendKanjiBytes(String content, BitArray bits) throws Wri...
    method appendECI (line 614) | private static void appendECI(CharacterSetECI eci, BitArray bits) {

FILE: scanner/src/main/java/com/google/zxing/qrcode/encoder/MaskUtil.java
  class MaskUtil (line 24) | final class MaskUtil {
    method MaskUtil (line 32) | private MaskUtil() {
    method applyMaskPenaltyRule1 (line 40) | static int applyMaskPenaltyRule1(ByteMatrix matrix) {
    method applyMaskPenaltyRule2 (line 49) | static int applyMaskPenaltyRule2(ByteMatrix matrix) {
    method applyMaskPenaltyRule3 (line 71) | static int applyMaskPenaltyRule3(ByteMatrix matrix) {
    method isWhiteHorizontal (line 106) | private static boolean isWhiteHorizontal(byte[] rowArray, int from, in...
    method isWhiteVertical (line 117) | private static boolean isWhiteVertical(byte[][] array, int col, int fr...
    method applyMaskPenaltyRule4 (line 132) | static int applyMaskPenaltyRule4(ByteMatrix matrix) {
    method getDataMaskBit (line 154) | static boolean getDataMaskBit(int maskPattern, int x, int y) {
    method applyMaskPenaltyRule1Internal (line 195) | private static int applyMaskPenaltyRule1Internal(ByteMatrix matrix, bo...

FILE: scanner/src/main/java/com/google/zxing/qrcode/encoder/MatrixUtil.java
  class MatrixUtil (line 28) | final class MatrixUtil {
    method MatrixUtil (line 118) | private MatrixUtil() {
    method clearMatrix (line 126) | static void clearMatrix(ByteMatrix matrix) {
    method buildMatrix (line 132) | static void buildMatrix(BitArray dataBits,
    method embedBasicPatterns (line 153) | static void embedBasicPatterns(Version version, ByteMatrix matrix) thr...
    method embedTypeInfo (line 166) | static void embedTypeInfo(ErrorCorrectionLevel ecLevel, int maskPatter...
    method maybeEmbedVersionInfo (line 198) | static void maybeEmbedVersionInfo(Version version, ByteMatrix matrix) ...
    method embedDataBits (line 222) | static void embedDataBits(BitArray dataBits, int maskPattern, ByteMatr...
    method findMSBSet (line 274) | static int findMSBSet(int value) {
    method calculateBCHCode (line 303) | static int calculateBCHCode(int value, int poly) {
    method makeTypeInfoBits (line 322) | static void makeTypeInfoBits(ErrorCorrectionLevel ecLevel, int maskPat...
    method makeVersionInfoBits (line 344) | static void makeVersionInfoBits(Version version, BitArray bits) throws...
    method isEmpty (line 355) | private static boolean isEmpty(int value) {
    method embedTimingPatterns (line 359) | private static void embedTimingPatterns(ByteMatrix matrix) {
    method embedDarkDotAtLeftBottomCorner (line 376) | private static void embedDarkDotAtLeftBottomCorner(ByteMatrix matrix) ...
    method embedHorizontalSeparationPattern (line 383) | private static void embedHorizontalSeparationPattern(int xStart,
    method embedVerticalSeparationPattern (line 394) | private static void embedVerticalSeparationPattern(int xStart,
    method embedPositionAdjustmentPattern (line 405) | private static void embedPositionAdjustmentPattern(int xStart, int ySt...
    method embedPositionDetectionPattern (line 414) | private static void embedPositionDetectionPattern(int xStart, int ySta...
    method embedPositionDetectionPatternsAndSeparators (line 424) | private static void embedPositionDetectionPatternsAndSeparators(ByteMa...
    method maybeEmbedPositionAdjustmentPatterns (line 456) | private static void maybeEmbedPositionAdjustmentPatterns(Version versi...

FILE: scanner/src/main/java/com/google/zxing/qrcode/encoder/QRCode.java
  class QRCode (line 27) | public final class QRCode {
    method QRCode (line 37) | public QRCode() {
    method getMode (line 41) | public Mode getMode() {
    method getECLevel (line 45) | public ErrorCorrectionLevel getECLevel() {
    method getVersion (line 49) | public Version getVersion() {
    method getMaskPattern (line 53) | public int getMaskPattern() {
    method getMatrix (line 57) | public ByteMatrix getMatrix() {
    method toString (line 61) | @Override
    method setMode (line 83) | public void setMode(Mode value) {
    method setECLevel (line 87) | public void setECLevel(ErrorCorrectionLevel value) {
    method setVersion (line 91) | public void setVersion(Version version) {
    method setMaskPattern (line 95) | public void setMaskPattern(int value) {
    method setMatrix (line 99) | public void setMatrix(ByteMatrix value) {
    method isValidMaskPattern (line 104) | public static boolean isValidMaskPattern(int maskPattern) {

FILE: scanner/src/main/java/com/nanchen/scanner/module/CaptureActivity.java
  class CaptureActivity (line 52) | public class CaptureActivity extends BaseCaptureActivity implements View...
    method startForResult (line 68) | public static void startForResult(final Activity activity, final int r...
    method onCreate (line 93) | @Override
    method initView (line 103) | private void initView() {
    method onClick (line 126) | @Override
    method openGallery (line 140) | private void openGallery() {
    method initCamera (line 147) | private void initCamera(SurfaceHolder surfaceHolder) {
    method displayFrameworkBugMessageAndExit (line 173) | private void displayFrameworkBugMessageAndExit() {
    method resetStatusView (line 182) | private void resetStatusView() {
    method clickTorch (line 186) | public void clickTorch() {
    method getViewfinderView (line 193) | @Override
    method getHandler (line 198) | @Override
    method getCameraManager (line 203) | @Override
    method handleDecode (line 208) | @Override
    method doParseResult (line 220) | private void doParseResult(String result) {
    method drawViewfinder (line 231) | @Override
    method surfaceCreated (line 237) | @Override
    method surfaceChanged (line 248) | @Override
    method surfaceDestroyed (line 253) | @Override
    method getCurrentOrientation (line 258) | private int getCurrentOrientation() {
    method onResume (line 279) | @Override
    method onPause (line 345) | @Override
    method onDestroy (line 363) | @Override
    method onActivityResult (line 371) | @Override
    method showProgressDialog (line 410) | public void showProgressDialog(String msg) {
    method closeProgressDialog (line 425) | public void closeProgressDialog() {
    method restartPreviewAfterDelay (line 438) | public void restartPreviewAfterDelay(long delayMS) {
    method calculateFingerSpacing (line 448) | private float calculateFingerSpacing(MotionEvent event) {
    method isPreviewing (line 456) | private boolean isPreviewing() {
    method onTouchEvent (line 460) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/utils/PermissionConstants.java
  class PermissionConstants (line 20) | @SuppressLint("InlinedApi")
    method getPermissions (line 69) | public static String[] getPermissions(@Permission final String permiss...

FILE: scanner/src/main/java/com/nanchen/scanner/utils/PermissionUtils.java
  class PermissionUtils (line 35) | public final class PermissionUtils {
    method getPermissions (line 57) | public static List<String> getPermissions() {
    method getPermissions (line 68) | public static List<String> getPermissions(final String packageName) {
    method isGranted (line 87) | public static boolean isGranted(final String... permissions) {
    method isGranted (line 96) | private static boolean isGranted(final String permission) {
    method launchAppDetailsSettings (line 105) | public static void launchAppDetailsSettings() {
    method permission (line 117) | public static PermissionUtils permission(Context mContext, @Permission...
    method PermissionUtils (line 125) | private PermissionUtils(final String... permissions) {
    method rationale (line 143) | public PermissionUtils rationale(final OnRationaleListener listener) {
    method callback (line 154) | public PermissionUtils callback(final SimpleCallback callback) {
    method callback (line 165) | public PermissionUtils callback(final FullCallback callback) {
    method theme (line 176) | public PermissionUtils theme(final ThemeCallback callback) {
    method request (line 184) | public void request() {
    method startPermissionActivity (line 206) | @RequiresApi(api = Build.VERSION_CODES.M)
    method rationale (line 213) | @RequiresApi(api = Build.VERSION_CODES.M)
    method getPermissionsStatus (line 239) | private void getPermissionsStatus(final Activity activity) {
    method requestCallback (line 252) | private void requestCallback() {
    method onRequestPermissionsResult (line 279) | private void onRequestPermissionsResult(final Activity activity) {
    class PermissionActivity (line 285) | @RequiresApi(api = Build.VERSION_CODES.M)
      method start (line 288) | public static void start(final Context context) {
      method onCreate (line 294) | @Override
      method onRequestPermissionsResult (line 324) | @Override
      method dispatchTouchEvent (line 332) | @Override
    type OnRationaleListener (line 343) | public interface OnRationaleListener {
      method rationale (line 345) | void rationale(ShouldRequest shouldRequest);
      type ShouldRequest (line 347) | interface ShouldRequest {
        method again (line 348) | void again(boolean again);
    type SimpleCallback (line 352) | public interface SimpleCallback {
      method onGranted (line 353) | void onGranted();
      method onDenied (line 355) | void onDenied();
    type FullCallback (line 358) | public interface FullCallback {
      method onGranted (line 359) | void onGranted(List<String> permissionsGranted);
      method onDenied (line 361) | void onDenied(List<String> permissionsDeniedForever, List<String> pe...
    type ThemeCallback (line 364) | public interface ThemeCallback {
      method onActivityCreate (line 365) | void onActivityCreate(Activity activity);

FILE: scanner/src/main/java/com/nanchen/scanner/utils/QRUtils.java
  class QRUtils (line 20) | public class QRUtils {
    method getInstance (line 24) | public static QRUtils getInstance() {
    method decodeQRcodeByZxing (line 33) | public String decodeQRcodeByZxing(Bitmap scanBitmap) {

FILE: scanner/src/main/java/com/nanchen/scanner/utils/ScreenUtils.java
  class ScreenUtils (line 25) | public final class ScreenUtils {
    method ScreenUtils (line 26) | private ScreenUtils() {
    method getScreenWidth (line 35) | public static int getScreenWidth(Context context) {
    method getScreenHeight (line 53) | public static int getScreenHeight(Context context) {
    method getScreenDensity (line 71) | public static float getScreenDensity() {
    method getScreenDensityDpi (line 80) | public static int getScreenDensityDpi() {
    method setFullScreen (line 89) | public static void setFullScreen(@NonNull final Activity activity) {
    method setNonFullScreen (line 98) | public static void setNonFullScreen(@NonNull final Activity activity) {
    method toggleFullScreen (line 107) | public static void toggleFullScreen(@NonNull final Activity activity) {
    method isFullScreen (line 125) | public static boolean isFullScreen(@NonNull final Activity activity) {
    method setLandscape (line 135) | public static void setLandscape(@NonNull final Activity activity) {
    method setPortrait (line 144) | public static void setPortrait(@NonNull final Activity activity) {
    method isLandscape (line 153) | public static boolean isLandscape(Context context) {
    method isPortrait (line 163) | public static boolean isPortrait(Context context) {
    method getScreenRotation (line 174) | public static int getScreenRotation(@NonNull final Activity activity) {
    method screenShot (line 195) | public static Bitmap screenShot(@NonNull final Activity activity) {
    method screenShot (line 206) | public static Bitmap screenShot(@NonNull final Activity activity, bool...
    method isScreenLock (line 238) | public static boolean isScreenLock(Context context) {
    method getSleepDuration (line 251) | public static int getSleepDuration(Context context) {
    method isTablet (line 268) | public static boolean isTablet(Context context) {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/AmbientLightManager.java
  class AmbientLightManager (line 36) | final class AmbientLightManager implements SensorEventListener {
    method AmbientLightManager (line 45) | AmbientLightManager(Context context) {
    method start (line 49) | void start(CameraManager cameraManager) {
    method stop (line 61) | void stop() {
    method onSensorChanged (line 70) | @Override
    method onAccuracyChanged (line 82) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/BaseCaptureActivity.java
  class BaseCaptureActivity (line 34) | public abstract class BaseCaptureActivity extends Activity implements Su...
    method getViewfinderView (line 36) | public abstract ViewfinderView getViewfinderView();
    method getHandler (line 38) | public abstract Handler getHandler();
    method getCameraManager (line 40) | public abstract CameraManager getCameraManager();
    method handleDecode (line 42) | public abstract void handleDecode(String result, Bitmap barcode, float...
    method drawViewfinder (line 44) | public abstract void drawViewfinder();

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/BeepManager.java
  class BeepManager (line 39) | public final class BeepManager implements MediaPlayer.OnErrorListener, C...
    method BeepManager (line 51) | public BeepManager(Activity activity) {
    method updatePrefs (line 57) | public synchronized void updatePrefs() {
    method playBeepSoundAndVibrate (line 70) | public synchronized void playBeepSoundAndVibrate() {
    method shouldBeep (line 80) | private static boolean shouldBeep(SharedPreferences prefs, Context act...
    method buildMediaPlayer (line 94) | @TargetApi(Build.VERSION_CODES.KITKAT)
    method onError (line 112) | @Override
    method close (line 125) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/CaptureActivityHandler.java
  class CaptureActivityHandler (line 45) | public final class CaptureActivityHandler extends Handler {
    type State (line 54) | private enum State {
    method CaptureActivityHandler (line 60) | public CaptureActivityHandler(BaseCaptureActivity activity,
    method handleMessage (line 73) | @Override
    method quitSynchronously (line 136) | public void quitSynchronously() {
    method restartPreviewAndDecode (line 153) | private void restartPreviewAndDecode() {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/Contents.java
  class Contents (line 27) | public final class Contents {
    method Contents (line 28) | private Contents() {
    class Type (line 34) | public static final class Type {
      method Type (line 82) | private Type() {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/DecodeFormatManager.java
  class DecodeFormatManager (line 33) | public final class DecodeFormatManager {
    method DecodeFormatManager (line 75) | private DecodeFormatManager() {
    method onlyQrCode (line 78) | public static Set<BarcodeFormat> onlyQrCode(){
    method parseDecodeFormats (line 83) | public static Set<BarcodeFormat> parseDecodeFormats(Intent intent) {
    method parseDecodeFormats (line 92) | static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
    method parseDecodeFormats (line 100) | private static Set<BarcodeFormat> parseDecodeFormats(Iterable<String> ...

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/DecodeHandler.java
  class DecodeHandler (line 49) | final class DecodeHandler extends Handler {
    method DecodeHandler (line 58) | DecodeHandler(BaseCaptureActivity activity) {
    method handleMessage (line 64) | @Override
    method decode (line 87) | private void decode(byte[] data, int width, int height) {
    method bundleThumbnail (line 176) | private static void bundleThumbnail(PlanarYUVLuminanceSource source, B...

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/DecodeHintManager.java
  class DecodeHintManager (line 34) | public final class DecodeHintManager {
    method DecodeHintManager (line 41) | private DecodeHintManager() {
    method splitQuery (line 58) | private static Map<String, String> splitQuery(String query) {
    method parseDecodeHints (line 118) | static Map<DecodeHintType, ?> parseDecodeHints(Uri inputUri) {
    method parseDecodeHints (line 201) | public static Map<DecodeHintType, Object> parseDecodeHints(Intent inte...

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/DecodeThread.java
  class DecodeThread (line 35) | final class DecodeThread extends Thread {
    method DecodeThread (line 44) | DecodeThread(BaseCaptureActivity activity) {
    method getHandler (line 49) | Handler getHandler() {
    method run (line 58) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/FinishListener.java
  class FinishListener (line 27) | public final class FinishListener implements DialogInterface.OnClickList...
    method FinishListener (line 31) | public FinishListener(Activity activityToFinish) {
    method onCancel (line 35) | @Override
    method onClick (line 40) | @Override
    method run (line 45) | private void run() {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/InactivityTimer.java
  class InactivityTimer (line 33) | public final class InactivityTimer {
    method InactivityTimer (line 44) | public InactivityTimer(Activity activity) {
    method onActivity (line 51) | public synchronized void onActivity() {
    method onPause (line 61) | public synchronized void onPause() {
    method onResume (line 71) | public synchronized void onResume() {
    method cancel (line 81) | private synchronized void cancel() {
    method shutdown (line 89) | public void shutdown() {
    class PowerStatusReceiver (line 93) | private final class PowerStatusReceiver extends BroadcastReceiver {
      method onReceive (line 94) | @Override
    class InactivityAsyncTask (line 108) | private final class InactivityAsyncTask extends AsyncTask<Object,Objec...
      method doInBackground (line 109) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/Intents.java
  class Intents (line 27) | public final class Intents {
    method Intents (line 28) | private Intents() {
    class Scan (line 34) | public static final class Scan {
      method Scan (line 178) | private Scan() {
    class History (line 185) | public static final class History {
      method History (line 189) | private History() {
    class Encode (line 196) | public static final class Encode {
      method Encode (line 230) | private Encode() {
    class SearchBookContents (line 237) | public static final class SearchBookContents {
      method SearchBookContents (line 253) | private SearchBookContents() {
    class WifiConnect (line 260) | public static final class WifiConnect {
      method WifiConnect (line 281) | private WifiConnect() {
    class Share (line 288) | public static final class Share {
      method Share (line 295) | private Share() {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/ViewfinderResultPointCallback.java
  class ViewfinderResultPointCallback (line 22) | final class ViewfinderResultPointCallback implements ResultPointCallback {
    method ViewfinderResultPointCallback (line 26) | ViewfinderResultPointCallback(ViewfinderView viewfinderView) {
    method foundPossibleResultPoint (line 30) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/ViewfinderView.java
  class ViewfinderView (line 44) | public final class ViewfinderView extends View {
    method ViewfinderView (line 69) | public ViewfinderView(Context context, AttributeSet attrs) {
    method setCameraManager (line 89) | public void setCameraManager(CameraManager cameraManager) {
    method onDraw (line 93) | @SuppressLint("DrawAllocation")
    method initAnimator (line 236) | private void initAnimator(Rect frame) {
    method drawViewfinder (line 252) | public void drawViewfinder() {
    method drawResultBitmap (line 261) | public void drawResultBitmap(Bitmap barcode) {
    method addPossibleResultPoint (line 265) | public void addPossibleResultPoint(ResultPoint point) {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/AutoFocusManager.java
  class AutoFocusManager (line 31) | @SuppressWarnings("deprecation") // camera APIs
    method AutoFocusManager (line 53) | AutoFocusManager(Context context, Camera camera) {
    method onAutoFocus (line 62) | @Override
    method autoFocusAgainLater (line 68) | private synchronized void autoFocusAgainLater() {
    method start (line 80) | synchronized void start() {
    method cancelOutstandingTask (line 97) | private synchronized void cancelOutstandingTask() {
    method stop (line 106) | synchronized void stop() {
    class AutoFocusTask (line 120) | private final class AutoFocusTask extends AsyncTask<Object, Object, Ob...
      method doInBackground (line 121) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/CameraConfigurationManager.java
  class CameraConfigurationManager (line 42) | @SuppressWarnings("deprecation") // camera APIs
    method CameraConfigurationManager (line 55) | CameraConfigurationManager(Context context) {
    method initFromCameraParameters (line 62) | void initFromCameraParameters(OpenCamera camera) {
    method setDesiredCameraParameters (line 147) | void setDesiredCameraParameters(OpenCamera camera, boolean safeMode) {
    method getBestPreviewSize (line 222) | Point getBestPreviewSize() {
    method getPreviewSizeOnScreen (line 226) | Point getPreviewSizeOnScreen() {
    method getCameraResolution (line 230) | Point getCameraResolution() {
    method getScreenResolution (line 234) | Point getScreenResolution() {
    method getCWNeededRotation (line 238) | int getCWNeededRotation() {
    method getTorchState (line 242) | boolean getTorchState(Camera camera) {
    method setTorch (line 255) | void setTorch(Camera camera, boolean newSetting) {
    method initializeTorch (line 261) | private void initializeTorch(Camera.Parameters parameters, SharedPrefe...
    method doSetTorch (line 266) | private void doSetTorch(Camera.Parameters parameters, boolean newSetti...
    method findCloselySize (line 282) | private Camera.Size findCloselySize(int surfaceWidth, int surfaceHeigh...
    method setZoom (line 291) | private void setZoom(Camera.Parameters parameters) {
    method findBestMotZoomValue (line 362) | private static int findBestMotZoomValue(CharSequence stringValues, int...
    class SizeComparator (line 384) | private static class SizeComparator implements Comparator<Camera.Size> {
      method SizeComparator (line 390) | SizeComparator(int width, int height) {
      method compare (line 401) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/CameraConfigurationUtils.java
  class CameraConfigurationUtils (line 37) | @SuppressWarnings("deprecation") // camera APIs
    method CameraConfigurationUtils (line 52) | private CameraConfigurationUtils() {
    method setFocus (line 55) | public static void setFocus(Camera.Parameters parameters,
    method setTorch (line 90) | public static void setTorch(Camera.Parameters parameters, boolean on) {
    method setBestExposure (line 113) | public static void setBestExposure(Camera.Parameters parameters, boole...
    method setBestPreviewFPS (line 135) | public static void setBestPreviewFPS(Camera.Parameters parameters) {
    method setBestPreviewFPS (line 139) | public static void setBestPreviewFPS(Camera.Parameters parameters, int...
    method setFocusArea (line 168) | public static void setFocusArea(Camera.Parameters parameters) {
    method setMetering (line 179) | public static void setMetering(Camera.Parameters parameters) {
    method buildMiddleArea (line 190) | private static List<Camera.Area> buildMiddleArea(int areaPer1000) {
    method setVideoStabilization (line 195) | public static void setVideoStabilization(Camera.Parameters parameters) {
    method setBarcodeSceneMode (line 208) | public static void setBarcodeSceneMode(Camera.Parameters parameters) {
    method setZoom (line 221) | public static void setZoom(Camera.Parameters parameters, double target...
    method indexOfClosestZoom (line 238) | private static Integer indexOfClosestZoom(Camera.Parameters parameters...
    method setInvertColor (line 260) | public static void setInvertColor(Camera.Parameters parameters) {
    method findBestPreviewSizeValue (line 273) | public static Point findBestPreviewSizeValue(Camera.Parameters paramet...
    method findSettableValue (line 347) | private static String findSettableValue(String name,
    method toString (line 364) | private static String toString(Collection<int[]> arrays) {
    method toString (line 381) | private static String toString(Iterable<Camera.Area> areas) {
    method collectStats (line 392) | public static String collectStats(Camera.Parameters parameters) {
    method collectStats (line 396) | public static String collectStats(CharSequence flattenedParams) {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/CameraManager.java
  class CameraManager (line 40) | @SuppressWarnings("deprecation") // camera APIs
    method CameraManager (line 67) | public CameraManager(Context context) {
    method openDriver (line 79) | public synchronized void openDriver(SurfaceHolder holder) throws IOExc...
    method isOpen (line 125) | public synchronized boolean isOpen() {
    method closeDriver (line 132) | public synchronized void closeDriver() {
    method startPreview (line 146) | public synchronized void startPreview() {
    method stopPreview (line 158) | public synchronized void stopPreview() {
    method setTorch (line 175) | public synchronized void setTorch(boolean newSetting) {
    method requestPreviewFrame (line 199) | public synchronized void requestPreviewFrame(Handler handler, int mess...
    method getFramingRect (line 214) | public synchronized Rect getFramingRect() {
    method findDesiredDimensionInRange (line 236) | private static int findDesiredDimensionInRange(int resolution, int har...
    method getFramingRectInPreview (line 253) | public synchronized Rect getFramingRectInPreview() {
    method setManualCameraId (line 282) | public synchronized void setManualCameraId(int cameraId) {
    method setManualFramingRect (line 293) | public synchronized void setManualFramingRect(int width, int height) {
    method buildLuminanceSource (line 322) | public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data, int ...
    method handleZoom (line 335) | public void handleZoom(boolean isZoomIn) {
    method handleDoubleZoom (line 359) | public void handleDoubleZoom() {
    method isPreviewing (line 381) | public boolean isPreviewing() {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/FrontLightMode.java
  type FrontLightMode (line 24) | public enum FrontLightMode {
    method parse (line 33) | private static FrontLightMode parse(String modeString) {
    method readPref (line 37) | public static FrontLightMode readPref(SharedPreferences sharedPrefs) {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/PreviewCallback.java
  class PreviewCallback (line 25) | @SuppressWarnings("deprecation") // camera APIs
    method PreviewCallback (line 34) | PreviewCallback(CameraConfigurationManager configManager) {
    method setHandler (line 38) | void setHandler(Handler previewHandler, int previewMessage) {
    method onPreviewFrame (line 43) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/open/CameraFacing.java
  type CameraFacing (line 22) | public enum CameraFacing {

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/open/OpenCamera.java
  class OpenCamera (line 24) | @SuppressWarnings("deprecation") // camera APIs
    method OpenCamera (line 32) | public OpenCamera(int index, Camera camera, CameraFacing facing, int o...
    method getCamera (line 39) | public Camera getCamera() {
    method getFacing (line 43) | public CameraFacing getFacing() {
    method getOrientation (line 47) | public int getOrientation() {
    method toString (line 51) | @Override

FILE: scanner/src/main/java/com/nanchen/scanner/zxing/camera/open/OpenCameraInterface.java
  class OpenCameraInterface (line 25) | @SuppressWarnings("deprecation") // camera APIs
    method OpenCameraInterface (line 33) | private OpenCameraInterface() {
    method open (line 44) | public static OpenCamera open(int cameraId) {
Condensed preview — 306 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,635K chars).
[
  {
    "path": ".gitignore",
    "chars": 202,
    "preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches/build_file_checksums.ser\n/.idea/libraries\n/.idea/modules.xml\n/.idea/worksp"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "chars": 1775,
    "preview": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <Objective-C-extension"
  },
  {
    "path": ".idea/gradle.xml",
    "chars": 679,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linke"
  },
  {
    "path": ".idea/misc.xml",
    "chars": 2101,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"NullableNotNullManager\">\n    <option nam"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "chars": 564,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <o"
  },
  {
    "path": ".idea/vcs.xml",
    "chars": 167,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "README.md",
    "chars": 3218,
    "preview": "# AiYaScanner\n:fire: zxing and zbar combined with scan code.  只为真正的 zxing zbar 结合二维码扫描:https://github.com/nanchen2251/Ai"
  },
  {
    "path": "app/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "chars": 1030,
    "preview": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 28\n    defaultConfig {\n        applicationId \"c"
  },
  {
    "path": "app/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "app/src/androidTest/java/com/nanchen/aiyascanner/ExampleInstrumentedTest.java",
    "chars": 730,
    "preview": "package com.nanchen.aiyascanner;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\ni"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "chars": 717,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "app/src/main/java/com/nanchen/aiyascanner/MainActivity.java",
    "chars": 1267,
    "preview": "package com.nanchen.aiyascanner;\n\nimport android.annotation.SuppressLint;\nimport android.content.Intent;\nimport android."
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "chars": 5606,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:wi"
  },
  {
    "path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "chars": 1880,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    "
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "chars": 805,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.constraint.ConstraintLayout xmlns:android=\"http://schemas.androi"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 272,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "chars": 272,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "chars": 248,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"color"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "chars": 213,
    "preview": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "chars": 125,
    "preview": "<resources>\n    <string name=\"app_name\">AiYaScanner</string>\n    <string name=\"scanner_test\">点击测试扫一扫!</string>\n\n</resour"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "chars": 383,
    "preview": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
  },
  {
    "path": "app/src/test/java/com/nanchen/aiyascanner/ExampleUnitTest.java",
    "chars": 384,
    "preview": "package com.nanchen.aiyascanner;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit t"
  },
  {
    "path": "build.gradle",
    "chars": 589,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    \n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 200,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "gradle.properties",
    "chars": 728,
    "preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
  },
  {
    "path": "gradlew",
    "chars": 5296,
    "preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up"
  },
  {
    "path": "gradlew.bat",
    "chars": 2260,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
  },
  {
    "path": "scanner/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "scanner/build.gradle",
    "chars": 778,
    "preview": "apply plugin: 'com.android.library'\n\nandroid {\n    compileSdkVersion 28\n\n    defaultConfig {\n        minSdkVersion 15\n  "
  },
  {
    "path": "scanner/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "scanner/src/main/AndroidManifest.xml",
    "chars": 1150,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.nanchen.scanner\">\n\n    <uses-permi"
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/BarcodeFormat.java",
    "chars": 1516,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/Binarizer.java",
    "chars": 3596,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/BinaryBitmap.java",
    "chars": 5369,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/ChecksumException.java",
    "chars": 1399,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/DecodeHintType.java",
    "chars": 3940,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/Dimension.java",
    "chars": 1421,
    "preview": "/*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/EncodeHintType.java",
    "chars": 3760,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/FormatException.java",
    "chars": 1416,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/InvertedLuminanceSource.java",
    "chars": 2460,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/LuminanceSource.java",
    "chars": 5320,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/MultiFormatReader.java",
    "chars": 6342,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/MultiFormatWriter.java",
    "chars": 3178,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/NotFoundException.java",
    "chars": 1141,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/PlanarYUVLuminanceSource.java",
    "chars": 5442,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/RGBLuminanceSource.java",
    "chars": 4366,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/Reader.java",
    "chars": 2761,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/ReaderException.java",
    "chars": 1458,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/Result.java",
    "chars": 4340,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/ResultMetadataType.java",
    "chars": 2931,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/ResultPoint.java",
    "chars": 3935,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/ResultPointCallback.java",
    "chars": 911,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/Writer.java",
    "chars": 2031,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/WriterException.java",
    "chars": 1037,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/AztecDetectorResult.java",
    "chars": 1638,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/AztecReader.java",
    "chars": 3973,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/AztecWriter.java",
    "chars": 3688,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/decoder/Decoder.java",
    "chars": 12407,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/detector/Detector.java",
    "chars": 20595,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/AztecCode.java",
    "chars": 1805,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/BinaryShiftToken.java",
    "chars": 2050,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/Encoder.java",
    "chars": 12394,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/HighLevelEncoder.java",
    "chars": 11485,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/SimpleToken.java",
    "chars": 1312,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/State.java",
    "chars": 6815,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/aztec/encoder/Token.java",
    "chars": 1288,
    "preview": "/*\n * Copyright 2013 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/AbstractDoCoMoResultParser.java",
    "chars": 1405,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/AddressBookAUResultParser.java",
    "chars": 3522,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/AddressBookDoCoMoResultParser.java",
    "chars": 3507,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/AddressBookParsedResult.java",
    "chars": 6360,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/BizcardResultParser.java",
    "chars": 3689,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/BookmarkDoCoMoResultParser.java",
    "chars": 1277,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/CalendarParsedResult.java",
    "chars": 7760,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/EmailAddressParsedResult.java",
    "chars": 2401,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/EmailAddressResultParser.java",
    "chars": 2746,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/EmailDoCoMoResultParser.java",
    "chars": 2184,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ExpandedProductParsedResult.java",
    "chars": 6200,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ExpandedProductResultParser.java",
    "chars": 6602,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/GeoParsedResult.java",
    "chars": 2549,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/GeoResultParser.java",
    "chars": 2227,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ISBNParsedResult.java",
    "chars": 1075,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ISBNResultParser.java",
    "chars": 1443,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ParsedResult.java",
    "chars": 1993,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ParsedResultType.java",
    "chars": 933,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ProductParsedResult.java",
    "chars": 1418,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ProductResultParser.java",
    "chars": 1847,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/ResultParser.java",
    "chars": 8089,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/SMSMMSResultParser.java",
    "chars": 3865,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/SMSParsedResult.java",
    "chars": 2899,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/SMSTOMMSTOResultParser.java",
    "chars": 1813,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/SMTPResultParser.java",
    "chars": 1808,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/TelParsedResult.java",
    "chars": 1432,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/TelResultParser.java",
    "chars": 1383,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/TextParsedResult.java",
    "chars": 1212,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/URIParsedResult.java",
    "chars": 2478,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/URIResultParser.java",
    "chars": 3141,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/URLTOResultParser.java",
    "chars": 1432,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/VCardResultParser.java",
    "chars": 15030,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/VEventResultParser.java",
    "chars": 4190,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/VINParsedResult.java",
    "chars": 3164,
    "preview": "/*\n * Copyright 2014 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/VINResultParser.java",
    "chars": 5089,
    "preview": "/*\n * Copyright 2014 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/WifiParsedResult.java",
    "chars": 2726,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/client/result/WifiResultParser.java",
    "chars": 2778,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/BitArray.java",
    "chars": 10140,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/BitMatrix.java",
    "chars": 13793,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/BitSource.java",
    "chars": 3319,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/CharacterSetECI.java",
    "chars": 3491,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/DecoderResult.java",
    "chars": 3983,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/DefaultGridSampler.java",
    "chars": 3598,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/DetectorResult.java",
    "chars": 1329,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/GlobalHistogramBinarizer.java",
    "chars": 6853,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/GridSampler.java",
    "chars": 7143,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/HybridBinarizer.java",
    "chars": 9931,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/PerspectiveTransform.java",
    "chars": 6208,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/StringUtils.java",
    "chars": 6686,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/detector/MathUtils.java",
    "chars": 2307,
    "preview": "/*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/detector/MonochromeRectangleDetector.java",
    "chars": 8409,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/detector/WhiteRectangleDetector.java",
    "chars": 9856,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/reedsolomon/GenericGF.java",
    "chars": 4792,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/reedsolomon/GenericGFPoly.java",
    "chars": 8542,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/reedsolomon/ReedSolomonDecoder.java",
    "chars": 7048,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java",
    "chars": 2660,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/common/reedsolomon/ReedSolomonException.java",
    "chars": 938,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/DataMatrixReader.java",
    "chars": 5503,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/DataMatrixWriter.java",
    "chars": 7021,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/decoder/BitMatrixParser.java",
    "chars": 14667,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/decoder/DataBlock.java",
    "chars": 4647,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java",
    "chars": 17628,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/decoder/Decoder.java",
    "chars": 4844,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/decoder/Version.java",
    "chars": 7635,
    "preview": "/*\n * Copyright 2007 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/detector/Detector.java",
    "chars": 12114,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/ASCIIEncoder.java",
    "chars": 3205,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/Base256Encoder.java",
    "chars": 2598,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/C40Encoder.java",
    "chars": 5780,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/DataMatrixSymbolInfo144.java",
    "chars": 978,
    "preview": "/*\n * Copyright 2006 Jeremias Maerki\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/DefaultPlacement.java",
    "chars": 5567,
    "preview": "/*\n * Copyright 2006 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/EdifactEncoder.java",
    "chars": 4724,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/Encoder.java",
    "chars": 742,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/EncoderContext.java",
    "chars": 3397,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/ErrorCorrection.java",
    "chars": 7200,
    "preview": "/*\n * Copyright 2006 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/HighLevelEncoder.java",
    "chars": 13897,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/SymbolInfo.java",
    "chars": 7496,
    "preview": "/*\n * Copyright 2006 Jeremias Maerki\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/SymbolShapeHint.java",
    "chars": 846,
    "preview": "/*\n * Copyright 2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n"
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/TextEncoder.java",
    "chars": 2092,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/datamatrix/encoder/X12Encoder.java",
    "chars": 2708,
    "preview": "/*\n * Copyright 2006-2007 Jeremias Maerki.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/maxicode/MaxiCodeReader.java",
    "chars": 4066,
    "preview": "/*\n * Copyright 2011 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/maxicode/decoder/BitMatrixParser.java",
    "chars": 5625,
    "preview": "/*\n * Copyright 2011 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/maxicode/decoder/DecodedBitStreamParser.java",
    "chars": 8064,
    "preview": "/*\n * Copyright 2011 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/maxicode/decoder/Decoder.java",
    "chars": 3830,
    "preview": "/*\n * Copyright 2011 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/multi/ByQuadrantReader.java",
    "chars": 3834,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/multi/GenericMultipleBarcodeReader.java",
    "chars": 6003,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/multi/MultipleBarcodeReader.java",
    "chars": 1204,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/multi/qrcode/QRCodeMultiReader.java",
    "chars": 7055,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/multi/qrcode/detector/MultiDetector.java",
    "chars": 2396,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder.java",
    "chars": 11653,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/CodaBarReader.java",
    "chars": 11790,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/CodaBarWriter.java",
    "chars": 4664,
    "preview": "/*\n * Copyright 2011 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/Code128Reader.java",
    "chars": 17155,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/Code128Writer.java",
    "chars": 9480,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/Code39Reader.java",
    "chars": 11638,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/Code39Writer.java",
    "chars": 5430,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/Code93Reader.java",
    "chars": 9598,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/Code93Writer.java",
    "chars": 6508,
    "preview": "/*\n * Copyright 2015 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/EAN13Reader.java",
    "chars": 4784,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/EAN13Writer.java",
    "chars": 3570,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/EAN8Reader.java",
    "chars": 2115,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/EAN8Writer.java",
    "chars": 3365,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/EANManufacturerOrgSupport.java",
    "chars": 5745,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/ITFReader.java",
    "chars": 13077,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/ITFWriter.java",
    "chars": 3049,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/MultiFormatOneDReader.java",
    "chars": 3848,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/MultiFormatUPCEANReader.java",
    "chars": 4858,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/OneDReader.java",
    "chars": 11849,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/OneDimensionalCodeWriter.java",
    "chars": 5106,
    "preview": "/*\n * Copyright 2011 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCAReader.java",
    "chars": 2967,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCAWriter.java",
    "chars": 1843,
    "preview": "/*\n * Copyright 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEANExtension2Support.java",
    "chars": 3663,
    "preview": "/*\n * Copyright (C) 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEANExtension5Support.java",
    "chars": 5522,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEANExtensionSupport.java",
    "chars": 1475,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEANReader.java",
    "chars": 14809,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEANWriter.java",
    "chars": 1059,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEReader.java",
    "chars": 5732,
    "preview": "/*\n * Copyright 2008 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/UPCEWriter.java",
    "chars": 3388,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/AbstractRSSReader.java",
    "chars": 4219,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/DataCharacter.java",
    "chars": 1525,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/FinderPattern.java",
    "chars": 1629,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/Pair.java",
    "chars": 1049,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/RSS14Reader.java",
    "chars": 14854,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/RSSUtils.java",
    "chars": 3758,
    "preview": "/*\n * Copyright 2009 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java",
    "chars": 2432,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/ExpandedPair.java",
    "chars": 2847,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/ExpandedRow.java",
    "chars": 2006,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java",
    "chars": 24779,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI013103decoder.java",
    "chars": 1437,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01320xDecoder.java",
    "chars": 1574,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01392xDecoder.java",
    "chars": 2187,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01393xDecoder.java",
    "chars": 2600,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI013x0x1xDecoder.java",
    "chars": 3162,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  },
  {
    "path": "scanner/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI013x0xDecoder.java",
    "chars": 1806,
    "preview": "/*\n * Copyright (C) 2010 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
  }
]

// ... and 106 more files (download for full content)

About this extraction

This page contains the full source code of the nanchen2251/AiYaScanner GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 306 files (1.5 MB), approximately 435.2k tokens, and a symbol index with 2074 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!