docs: static public int compare(InetAddress a1, InetAddress a2) {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "compare, a1 is " + a1);
              Tr.debug(tc, "compare, a2 is " + a2);
          }
          byte[] byte1 = a1.getAddress();
          byte[] byte2 = a2.getAddress();
  
          int len;
          int base1 = 0;
          int base2 = 0;
  
          /**
           * if the byte arrays aren't the same length, see if the extra bytes are all zeros. If they are, we can
           * just skip over them and compare the remaining bytes. If any extra byte is not zero, then the
           * corresponding byte array must be mumerically larger so return that fact.
           */
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "compare, byte1.length is " + byte1.length);
              Tr.debug(tc, "compare, byte2.length is " + byte2.length);
          }
          if (byte1.length > byte2.length) {
              //byte1 is longer
              len = byte2.length;
              base1 = byte1.length - len;
  
              //if byte starts with zeros, continue. If it doesn't, return 1 indicating byte1 is numerically larger
              if (!isZeros(byte1, byte1.length - len))
                  return 1;
          } else if (byte1.length < byte2.length) {
              //byte2 is longer
              len = byte1.length;
              base2 = byte2.length - len;
  
              //if byte starts with zeros, continue. If it doesn't, return 1 indicating byte2 is numerically larger
              if (!isZeros(byte2, byte2.length - len))
                  return -1;
          } else {
              len = byte1.length; //they are the same
          }
  
          /*
           * now that we've skipped over the extra bytes (all zero), compare the rest of the array byte by byte.
           */
          for (int i = 0; i < len; base1++, base2++, i++) {
  
              //equal??
              if (byte1[base1] == byte2[base2])
                  continue;
  
              /*
               * We have to be careful here to perform unsigned comparisons. Unfortunately, Java interpretes
               * high bit bytes as negative which messes thing up. So, we convert them to integers and then
               * add 256 if needed. Yuck.
               */
  
              int b1 = byte1[base1];
              if (b1 < 0)
                  b1 += 256;
              int b2 = byte2[base2];
              if (b2 < 0)
                  b2 += 256;
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "compare, b1 is " + b1);
                  Tr.debug(tc, "compare, b2 is " + b2);
              }
              if (b1 > b2)
                  return 1;
              else
                  return -1;
          }
          return 0;
      }