int r = remaining (); int i1 = position (); int i2 = a.position ();  for (int i = 0; i < r; i++) { int t = (int) (get (i1) - a.get (i2));  if (t != 0) { return (int) t; } }  return 0;
return remaining() - other.remaining();
  public int compareTo (Object obj)  {    ByteBuffer a = (ByteBuffer) obj;    if (a.remaining () != remaining ())      return 1;    if (! hasArray () ||        ! a.hasArray ())      {        return 1;      }    int r = remaining ();    int i1 = position ();    int i2 = a.position ();    for (int i = 0; i < r; i++)      {        int t = (int) (get (i1) - a.get (i2));        if (t != 0)          {            return (int) t;          }      }    return 0;  }