Package com.esotericsoftware.kryo.io

Examples of com.esotericsoftware.kryo.io.ByteBufferOutput.writeInt()


  public void testByteBufferOutputWithPreallocatedMemory () {
    long bufAddress = UnsafeUtil.unsafe().allocateMemory(4096);
    try {
      ByteBufferOutput outputBuffer = new ByteBufferOutput(bufAddress, 4096);
      outputBuffer.writeInt(10);

      ByteBufferInput inputBuffer = new ByteBufferInput(outputBuffer.getByteBuffer());
      inputBuffer.readInt();
      inputBuffer.release();
View Full Code Here


      inputBuffer.readInt();
      inputBuffer.release();

      outputBuffer.release();
      outputBuffer = new UnsafeMemoryOutput(bufAddress, 4096);
      outputBuffer.writeInt(10);

      inputBuffer = new UnsafeMemoryInput(outputBuffer.getByteBuffer());
      inputBuffer.readInt();
      inputBuffer.release();
      outputBuffer.release();
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.