aeron-client/src/main/java/io/aeron/DirectBufferVector.java
public DirectBufferVector validate()
    {
        final int capacity = buffer.capacity();
        if (offset < 0 || offset >= capacity)
        {
            throw new IllegalArgumentException("offset=" + offset + " capacity=" + capacity);
        }

        if (length < 0 || length > (capacity - offset))
        {
            throw new IllegalArgumentException("offset=" + offset + " capacity=" + capacity + " length=" + length);
        }

        return this;
    }
public DirectBufferVector validate()
    {
        final int capacity = buffer.capacity();
        if (offset < 0 || offset >= capacity)
        {
            throw new IllegalArgumentException("offset=" + offset + " capacity=" + capacity);
        }

        if (length < 0 || length > (capacity - offset))
        {
            throw new IllegalArgumentException("offset=" + offset + " capacity=" + capacity + " length=" + length);
        }

        return this;
    }
public DirectBufferVector validate ( ) { final int capacity = buffer . capacity ( ) ; if ( offset < 0 || offset >= capacity ) { throw new IllegalArgumentException ( "offset=" + offset + " capacity=" + capacity ) ; } if ( length < 0 || length > ( capacity - offset ) ) { throw new IllegalArgumentException ( "offset=" + offset + " capacity=" + capacity + " length=" + length ) ; } return this ; }
Ensure the vector is valid for the buffer.

@throws NullPointerException if the buffer is null.
@throws IllegalArgumentException if the offset is out of range for the buffer.
@throws IllegalArgumentException if the length is out of range for the buffer.
@return this for a fluent API.
Ensure the vector is valid for the buffer .