Package java.nio

Examples of java.nio.LongBuffer.position()


        out.position(iout.position() * INT_SIZE);

        // write our long data
        LongBuffer lout = out.asLongBuffer();
        lout.put(_total);
        out.position(iout.position() * INT_SIZE + lout.position() * 2 * INT_SIZE);

        // write our min value (added later so we can't write it above like we wish we could)
        out.asIntBuffer().put(_min);

        return data;
View Full Code Here


    FloatBuffer fBuffer = buffer.asFloatBuffer();
    fBuffer.position(1);
    System.out.println(Memory.getPosition(fBuffer));
   
    LongBuffer lBuffer = buffer.asLongBuffer();
    lBuffer.position(1);
    System.out.println(Memory.getPosition(lBuffer));
   
    DoubleBuffer dBuffer = buffer.asDoubleBuffer();
    dBuffer.position(1);
    System.out.println(Memory.getPosition(dBuffer));
View Full Code Here

    if (dst instanceof ByteBuffer)
      buffer = ((ByteBuffer)dst).asLongBuffer();
    else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }
View Full Code Here

    else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }

  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
   * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, the limit
View Full Code Here

    if (dst instanceof ByteBuffer)
      buffer = ((ByteBuffer)dst).asLongBuffer();
    else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
  }

  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
View Full Code Here

    else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
  }

  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
   * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position and limit will stay the same.
   * <b>The Buffer must be a direct Buffer with native byte order. No error checking is performed</b>.
View Full Code Here

    if (dst instanceof ByteBuffer)
      buffer = ((ByteBuffer)dst).asLongBuffer();
    else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }
View Full Code Here

    else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;
    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }

  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
   * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, the limit
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.