Package org.xtreemfs.foundation.buffer

Examples of org.xtreemfs.foundation.buffer.ReusableBuffer.range()


        e.logSequenceNo = data.getLong();
        e.payloadType = data.get();
        final int payloadSize = bufSize - headerLength;
        int payloadPosition = data.position();
        ReusableBuffer payload = data.createViewBuffer();
        payload.range(payloadPosition, payloadSize);
        e.payload = payload;
       
        if (USE_CHECKSUMS) {
            // reset the old checksum to 0, before calculating a new one
            data.position(Integer.SIZE / 8);
View Full Code Here


   
    public String toString() {
        // return buf.toString() + " [" + startOffset + ", " + endOffset + ")";
        ReusableBuffer buffer = new ReusableBuffer(buf);
        ReusableBuffer newBuf = buffer.createViewBuffer();
        newBuf.range(startOffset, endOffset - startOffset);
        return OutputUtils.byteArrayToHexString(newBuf.array());
    }
   
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.