text: public virtual int compareTo(java.nio.LongBuffer otherBuffer){int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining() : otherBuffer.remaining();int thisPos = _position;int otherPos = otherBuffer._position;long thisLong;long otherLong;while (compareRemaining > 0){thisLong = get(thisPos);otherLong = otherBuffer.get(otherPos);if (thisLong != otherLong){return thisLong < otherLong ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}