/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 64-bit platforms. * * @param n the maximum number of longs the {@link LongBuffer} can * read/write. This will be the {@link LongBuffer}'s * <code>capacity</code>. * @return the {@link LongBuffer}. * @throws IllegalStateException if this isn't a 64-bit platform. */ public LongBuffer asLongBuffer(int n) { if (_sizeOf() != 8) { throw new IllegalStateException("Not a 64-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 3) .order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * Returns a {@link IntBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 32-bit platforms. * * @param n the maximum number of ints the {@link IntBuffer} can * read/write. This will be the {@link IntBuffer}'s * <code>capacity</code>. * @return the {@link IntBuffer}. * @throws IllegalStateException if this isn't a 32-bit platform. */ public IntBuffer asIntBuffer(int n) { if (_sizeOf() != 4) { throw new IllegalStateException("Not a 32-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 2) .order(ByteOrder.nativeOrder()).asIntBuffer(); }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 64-bit platforms. * * @param n the maximum number of longs the {@link LongBuffer} can * read/write. This will be the {@link LongBuffer}'s * <code>capacity</code>. * @return the {@link LongBuffer}. * @throws IllegalStateException if this isn't a 64-bit platform. */ public LongBuffer asLongBuffer(int n) { if (_sizeOf() != 8) { throw new IllegalStateException("Not a 64-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 3) .order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * Returns a {@link IntBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 32-bit platforms. * * @param n the maximum number of ints the {@link IntBuffer} can * read/write. This will be the {@link IntBuffer}'s * <code>capacity</code>. * @return the {@link IntBuffer}. * @throws IllegalStateException if this isn't a 32-bit platform. */ public IntBuffer asIntBuffer(int n) { if (_sizeOf() != 4) { throw new IllegalStateException("Not a 32-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 2) .order(ByteOrder.nativeOrder()).asIntBuffer(); }
/** * Returns a {@link IntBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 32-bit platforms. * * @param n the maximum number of ints the {@link IntBuffer} can * read/write. This will be the {@link IntBuffer}'s * <code>capacity</code>. * @return the {@link IntBuffer}. * @throws IllegalStateException if this isn't a 32-bit platform. */ public IntBuffer asIntBuffer(int n) { if (_sizeOf() != 4) { throw new IllegalStateException("Not a 32-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 2) .order(ByteOrder.nativeOrder()).asIntBuffer(); }
/** * Returns a {@link IntBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 32-bit platforms. * * @param n the maximum number of ints the {@link IntBuffer} can * read/write. This will be the {@link IntBuffer}'s * <code>capacity</code>. * @return the {@link IntBuffer}. * @throws IllegalStateException if this isn't a 32-bit platform. */ public IntBuffer asIntBuffer(int n) { if (_sizeOf() != 4) { throw new IllegalStateException("Not a 32-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 2) .order(ByteOrder.nativeOrder()).asIntBuffer(); }
/** * Returns a {@link IntBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 32-bit platforms. * * @param n the maximum number of ints the {@link IntBuffer} can * read/write. This will be the {@link IntBuffer}'s * <code>capacity</code>. * @return the {@link IntBuffer}. * @throws IllegalStateException if this isn't a 32-bit platform. */ public IntBuffer asIntBuffer(int n) { if (_sizeOf() != 4) { throw new IllegalStateException("Not a 32-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 2) .order(ByteOrder.nativeOrder()).asIntBuffer(); }
/** * Returns a {@link IntBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 32-bit platforms. * * @param n the maximum number of ints the {@link IntBuffer} can * read/write. This will be the {@link IntBuffer}'s * <code>capacity</code>. * @return the {@link IntBuffer}. * @throws IllegalStateException if this isn't a 32-bit platform. */ public IntBuffer asIntBuffer(int n) { if (_sizeOf() != 4) { throw new IllegalStateException("Not a 32-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 2) .order(ByteOrder.nativeOrder()).asIntBuffer(); }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 64-bit platforms. * * @param n the maximum number of longs the {@link LongBuffer} can * read/write. This will be the {@link LongBuffer}'s * <code>capacity</code>. * @return the {@link LongBuffer}. * @throws IllegalStateException if this isn't a 64-bit platform. */ public LongBuffer asLongBuffer(int n) { if (_sizeOf() != 8) { throw new IllegalStateException("Not a 64-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 3) .order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 64-bit platforms. * * @param n the maximum number of longs the {@link LongBuffer} can * read/write. This will be the {@link LongBuffer}'s * <code>capacity</code>. * @return the {@link LongBuffer}. * @throws IllegalStateException if this isn't a 64-bit platform. */ public LongBuffer asLongBuffer(int n) { if (_sizeOf() != 8) { throw new IllegalStateException("Not a 64-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 3) .order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 64-bit platforms. * * @param n the maximum number of longs the {@link LongBuffer} can * read/write. This will be the {@link LongBuffer}'s * <code>capacity</code>. * @return the {@link LongBuffer}. * @throws IllegalStateException if this isn't a 64-bit platform. */ public LongBuffer asLongBuffer(int n) { if (_sizeOf() != 8) { throw new IllegalStateException("Not a 64-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 3) .order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link MachineSizedUIntPtr}. Must only be * called on 64-bit platforms. * * @param n the maximum number of longs the {@link LongBuffer} can * read/write. This will be the {@link LongBuffer}'s * <code>capacity</code>. * @return the {@link LongBuffer}. * @throws IllegalStateException if this isn't a 64-bit platform. */ public LongBuffer asLongBuffer(int n) { if (_sizeOf() != 8) { throw new IllegalStateException("Not a 64-bit platform"); } return VM.newDirectByteBuffer(getHandle(), n << 3) .order(ByteOrder.nativeOrder()).asLongBuffer(); }