public boolean findInList ( int [ ] address ) { int len = address . length ; if ( len < IP_ADDR_NUMBERS ) { int j = IP_ADDR_NUMBERS - 1 ; // for performace, hard code the size here int a [ ] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ; // int a[] = new int[IP_ADDR_NUMBERS]; // for (int i = 0; i < IP_ADDR_NUMBERS; i++) // { // a[i] = 0; // } for ( int i = len ; i > 0 ; i -- , j -- ) { a [ j ] = address [ i - 1 ] ; } return findInList ( a , 0 , firstCell , 7 ) ; } return findInList ( address , 0 , firstCell , ( address . length - 1 ) ) ; }
Determine if an address represented by an integer array is in the address tree