Buffer.limit

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

  1. int limit()
  2. Buffer limit(int newLimit)
    class Buffer
    final
    limit
    ()

Meta