code: public static int compareTo(byte[] lhs, byte[] rhs) {
          if (lhs == rhs) {
              return 0;
          }
          if (lhs == null) {
              return -1;
          }
          if (rhs == null) {
              return +1;
          }
          if (lhs.length != rhs.length) {
              return ((lhs.length < rhs.length) ? -1 : +1);
          }
          for (int i = 0; i < lhs.length; i++) {
              if (lhs[i] < rhs[i]) {
                  return -1;
              } else if (lhs[i] > rhs[i]) {
                  return 1;
              }
          }
          return 0;
      }
docs: <p>Compares two byte arrays as specified by <code>Comparable</code>.
  
  @param lhs - left hand value in the comparison operation.
  @param rhs - right hand value in the comparison operation.
  @return  a negative integer, zero, or a positive integer as <code>lhs</code>
  is less than, equal to, or greater than <code>rhs</code>.