private boolean readRawData ( QrCode qr ) { QrCode . VersionInfo info = QrCode . VERSION_INFO [ qr . version ] ; qr . rawbits = new byte [ info . codewords ] ; // predeclare memory bits . resize ( info . codewords * 8 ) ; // read bits from memory List < Point2D_I32 > locationBits = QrCode . LOCATION_BITS [ qr . version ] ; // end at bits.size instead of locationBits.size because location might point to useless bits for ( int i = 0 ; i < bits . size ; i ++ ) { Point2D_I32 b = locationBits . get ( i ) ; readDataMatrix ( i , b . y , b . x , qr . mask ) ; } // System.out.println("Version "+qr.version); // System.out.println("bits8.size "+bits8.size+" locationBits "+locationBits.size()); // bits8.print(); // copy over the results System . arraycopy ( bits . data , 0 , qr . rawbits , 0 , qr . rawbits . length ) ; return true ; }
Read the raw data from input memory