@@ -14,7 +14,7 @@ public class Reader {
1414 private static byte METADATE_START_MARKER [] = { (byte ) 0xAB , (byte ) 0xCD ,
1515 (byte ) 0xEF , 'M' , 'a' , 'x' , 'M' , 'i' , 'n' , 'd' , '.' , 'c' , 'o' , 'm' };
1616
17- private static final boolean DEBUG = true ;
17+ private static final boolean DEBUG = false ;
1818 private final Decoder decoder ;
1919 private final Metadata metadata ;
2020 private final long dataSectionEnd ;
@@ -173,7 +173,7 @@ private long[] splitNodeIntoRecords(ByteBuffer bytes)
173173 3 ));
174174 nodes [1 ] = Util .decodeLong (Arrays .copyOfRange (bytes .array (), 4 ,
175175 7 ));
176- nodes [0 ] = ((0xF0 & bytes .get (3 )) << 24 ) | nodes [0 ];
176+ nodes [0 ] = ((0xF0 & bytes .get (3 )) << 20 ) | nodes [0 ];
177177 nodes [1 ] = ((0x0F & bytes .get (3 )) << 24 ) | nodes [1 ];
178178 return nodes ;
179179 case 32 :
@@ -216,13 +216,11 @@ private Object resolveDataPointer(long pointer) throws MaxMindDbException,
216216 */
217217 private long findMetadataStart () throws IOException {
218218 long fileSize = this .fc .size ();
219- System .out .println (fileSize );
220219
221220 FILE : for (long i = 0 ; i < fileSize - METADATE_START_MARKER .length + 1 ; i ++) {
222221 for (int j = 0 ; j < METADATE_START_MARKER .length ; j ++) {
223222 ByteBuffer b = ByteBuffer .wrap (new byte [1 ]);
224223 this .fc .read (b , fileSize - i - j - 1 );
225- System .out .println (b .get (0 ));
226224 if (b .get (0 ) != METADATE_START_MARKER [METADATE_START_MARKER .length
227225 - j - 1 ]) {
228226 continue FILE ;
0 commit comments