Sets this buffer's limit. If the position is larger than the new limit
then it is set to the new limit. If the mark is defined and larger than
the new limit then it is discarded.
@param newLimit
The new limit value; must be non-negative
and no larger than this buffer's capacity
@return This buffer
@throws IllegalArgumentException
If the preconditions on <tt>newLimit</tt> do not hold
Sets this buffer's limit. If the position is larger than the new limit then it is set to the new limit. If the mark is defined and larger than the new limit then it is discarded.
@param newLimit The new limit value; must be non-negative and no larger than this buffer's capacity
@return This buffer
@throws IllegalArgumentException If the preconditions on <tt>newLimit</tt> do not hold