net.sf.jni4net.nio.BufferN.limit C# (CSharp) Method

limit() public method

public limit ( int newLimit ) : BufferN
newLimit int
return BufferN
        public BufferN limit(int newLimit)
        {
            if ((newLimit > _capacity) || (newLimit < 0))
                throw new IllegalArgumentException();
            _limit = newLimit;
            if (_position > _limit) _position = _limit;
            if (_mark > _limit) _mark = -1;
            return this;
        }

Same methods

BufferN::limit ( ) : int

Usage Example

Example #1
0
 internal static String toString(BufferN b)
 {
     return (b.GetType().Name
             + "[pos=" + b.position()
             + " lim=" + b.limit()
             + " cap=" + b.capacity()
             + "]");
 }