public ByteArray create( int size )
    {
        if ( size < 0 )
        {
            throw new IllegalArgumentException( "Buffer size must not be negative:" + size );
        }
        IoBuffer bb = IoBuffer.allocate( size );
        ByteArray ba = new BufferByteArray( bb )
        {

            @Override
            public void free()
            {
                // Nothing to do.
            }

        };
        return ba;
    }
public ByteArray create ( int size ) { if ( size < 0 ) { throw new IllegalArgumentException ( "Buffer size must not be negative:" + size ) ; } IoBuffer bb = IoBuffer . allocate ( size ) ; ByteArray ba = new BufferByteArray ( bb ) { @ Override public void free ( ) { } } ; return ba ; }
@inheritDoc