ReadableBuffer.limit

Sets the current read limit of this buffer to the given value. If the buffer mark value is defined and is larger than the limit the mark will be discarded. If the position is larger than the new limit it will be reset to the new limit.

@param limit The new read limit to set for this buffer.

@return a reference to this {@link ReadableBuffer}.

@throws IllegalArgumentException if the limit value is negative or greater than the capacity.

  1. ReadableBuffer limit(int limit)
    interface ReadableBuffer
  2. int limit()

Meta