File tree Expand file tree Collapse file tree
src/main/java/com/maxmind/maxminddb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,12 +246,8 @@ IntNode decodeInt32(int size) {
246246 }
247247
248248 private int decodeInteger (int size ) {
249- return this .decodeInteger (0 , size );
250- }
251-
252- private int decodeInteger (int base , int size ) {
253249 ByteBuffer buffer = this .threadBuffer .get ();
254- int integer = base ;
250+ int integer = 0 ;
255251 for (int i = 0 ; i < size ; i ++) {
256252 integer = (integer << 8 ) | (buffer .get () & 0xFF );
257253 }
@@ -382,23 +378,7 @@ private byte[] getByteArray(int length) {
382378 return Decoder .getByteArray (this .threadBuffer .get (), length );
383379 }
384380
385- static int decodeInteger (byte [] bytes ) {
386- int i = 0 ;
387- for (byte b : bytes ) {
388- i = (i << 8 ) | (b & 0xFF );
389- }
390- return i ;
391- }
392-
393- static long decodeLong (byte [] bytes ) {
394- long i = 0 ;
395- for (byte b : bytes ) {
396- i = (i << 8 ) | (b & 0xFF );
397- }
398- return i ;
399- }
400-
401- static byte [] getByteArray (ByteBuffer buffer , int length ) {
381+ private static byte [] getByteArray (ByteBuffer buffer , int length ) {
402382 byte [] bytes = new byte [length ];
403383 buffer .get (bytes );
404384 return bytes ;
Original file line number Diff line number Diff line change 11package com .maxmind .maxminddb ;
22
33import java .net .InetAddress ;
4- import java .nio .ByteBuffer ;
54
65final class Log {
76
8- static void debug (String string , ByteBuffer buffer ) {
9- debug (string , buffer .array ());
10- }
11-
127 static void debug (String string , byte [] buffer ) {
138 String binary = "" ;
149 for (byte b : buffer ) {
You can’t perform that action at this time.
0 commit comments