Package org.elasticsearch.common.bytes

Examples of org.elasticsearch.common.bytes.ByteBufferBytesReference


        int read = Channels.readFromFileChannel(fileChannel, offsetToRead, copy);
        assertThat(read, Matchers.equalTo(lengthToRead));
        copy.flip();

        BytesReference sourceRef = new BytesArray(randomBytes, offset + offsetToRead, lengthToRead);
        BytesReference copyRef = new ByteBufferBytesReference(copy);

        assertTrue("read bytes didn't match written bytes", sourceRef.equals(copyRef));
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.bytes.ByteBufferBytesReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.