public int compareTo(IntBuffer otherBuffer) {int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining(): otherBuffer.remaining();int thisPos = position;int otherPos = otherBuffer.position;int thisInt, otherInt;while (compareRemaining > 0) {thisInt = get(thisPos);otherInt = otherBuffer.get(otherPos);if (thisInt != otherInt) {return thisInt < otherInt ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}

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