/** * Copies {@code count} longs from the memory pointed to by this * {@link LongPtr} to {@code dst} starting at offset {@code offset}. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(long[] dst, int offset, int count) { asLongBuffer(count).get(dst, offset, count); }
/** * Creates a new {@link LongPtr} and initializes it with the specified value. * * @param value the value. */ public LongPtr(long value) { set(value); }
/** * Copies {@code n} longs from the memory pointed to by this {@link LongPtr} * to a new {@code long[]} instance. * * @param n the number of longs to copy. * @return the {@code long[]}. */ public long[] toLongArray(int n) { long[] result = new long[n]; get(result); return result; }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link LongPtr}. * * @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}. */ public LongBuffer asLongBuffer(int n) { return as(BytePtr.class).asByteBuffer(n << 3).order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * @since Available in iOS 3.2 and later. */ public long[] getStringIndices(@ByVal CFRange range) { LongPtr ptr = new LongPtr(); getStringIndices(range, ptr); return ptr.toLongArray((int) getGlyphCount()); } /**
@Deprecated public static void setProperty(AudioSessionProperty id, long value) throws OSStatusException { setProperty(id, new LongPtr(value)); } @Deprecated
public long[] getOutputDataAsLongArray() { LongPtr ptr = getOutputDataPointer().as(LongPtr.class); return ptr.toLongArray(getOutputDataSize()); } public float[] getOutputDataAsFloatArray() {
break; case LineBoundsOptions: size = LongPtr.sizeOf(); break; default:
/** * Copies {@code dst.length} longs from the memory pointed to by this * {@link LongPtr} to {@code dst}. * * @param dst the destination. */ public void get(long[] dst) { get(dst, 0, dst.length); }
/** * Returns a {@link LongBuffer} which reads and writes to the same memory * location pointed to by this {@link LongPtr}. * * @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}. */ public LongBuffer asLongBuffer(int n) { return as(BytePtr.class).asByteBuffer(n << 3).order(ByteOrder.nativeOrder()).asLongBuffer(); }
/** * @since Available in iOS 3.2 and later. */ public long[] getStringIndices(@ByVal CFRange range) { LongPtr ptr = new LongPtr(); getStringIndices(range, ptr); return ptr.toLongArray((int) getGlyphCount()); } /**
public void setProperty(MusicTrackProperty id, long value) throws OSStatusException { setProperty(id, new LongPtr(value)); } public void setProperty(MusicTrackProperty id, float value) throws OSStatusException {
public long[] getOutputDataAsLongArray() { LongPtr ptr = getOutputDataPointer().as(LongPtr.class); return ptr.toLongArray(getOutputDataSize()); } public float[] getOutputDataAsFloatArray() {
break; case LineBoundsOptions: size = LongPtr.sizeOf(); break; default: