aeron-client/src/main/java/io/aeron/DirectBufferVector.java
public static int validateAndComputeLength(final DirectBufferVector[] vectors)
    {
        int messageLength = 0;
        for (final DirectBufferVector vector : vectors)
        {
            vector.validate();
            messageLength += vector.length;

            if (messageLength < 0)
            {
                throw new IllegalStateException("length overflow: " + Arrays.toString(vectors));
            }
        }

        return messageLength;
    }
public static int validateAndComputeLength(final DirectBufferVector[] vectors)
    {
        int messageLength = 0;
        for (final DirectBufferVector vector : vectors)
        {
            vector.validate();
            messageLength += vector.length;

            if (messageLength < 0)
            {
                throw new IllegalStateException("length overflow: " + Arrays.toString(vectors));
            }
        }

        return messageLength;
    }
public static int validateAndComputeLength ( final DirectBufferVector [ ] vectors ) { int messageLength = 0 ; for ( final DirectBufferVector vector : vectors ) { vector . validate ( ) ; messageLength += vector . length ; if ( messageLength < 0 ) { throw new IllegalStateException ( "length overflow: " + Arrays . toString ( vectors ) ) ; } } return messageLength ; }
Validate an array of vectors to make up a message and compute the total length.

@param vectors to be validated summed.
@return the sum of the vector lengths.
Validate an array of vectors to make up a message and compute the total length .