/** * Copies {@code dst.length} ints from the memory pointed to by this * {@link MachineSizedSIntPtr} to {@code dst}. Does the proper * narrowing {@code long} to {@code int} conversion if running on a 64-bit * platform. * * @param dst the destination. */ public void get(int[] dst) { get(dst, 0, dst.length); }
/** * Copies {@code dst.length} longs from the memory pointed to by this * {@link MachineSizedSIntPtr} to {@code dst}. Does signed {@code int} to * {@code long} conversion if running on a 32-bit platform. * * @param dst the destination. */ public void get(long[] dst) { get(dst, 0, dst.length); }
/** * Copies {@code n} ints from the memory pointed to by this * {@link MachineSizedSIntPtr} to a new {@code int[]} instance. Does the * proper narrowing {@code long} to {@code int} conversion if running on a 64-bit * platform. * * @param n the number of ints to copy. * @return the {@code int[]}. */ public int[] toIntArray(int n) { int[] result = new int[n]; get(result); return result; }
/** * Copies {@code n} longs from the memory pointed to by this * {@link MachineSizedSIntPtr} to a new {@code long[]} instance. Does * signed {@code int} to {@code long} conversion if running on a 32-bit * platform. * * @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; }
/** * @since Available in iOS 2.0 and later. */ public long getLong(String key) { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); if (getInteger(key, ptr)) { return ptr.get(); } return 0; } public boolean hasDouble(String key) {
/** * @since Available in iOS 2.0 and later. */ public long getLong(long index) { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); if (getInteger(index, ptr)) { return ptr.get(); } return 0; } public boolean hasDouble(long index) {
/** * @since Available in iOS 2.0 and later. */ public long popLong() { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); if (popInteger(ptr)) { return ptr.get(); } return 0; } /**
/** * @since Available in iOS 2.0 and later. */ public @MachineSizedSInt double scanInteger() { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); if (!scanInteger(ptr)) { return 0; } return ptr.get(); } public long scanLong() {
/** * @throws OSStatusException * @since Available in iOS 6.0 and later. */ public long getSourceAudio(long numberFrames, AudioBufferList bufferList, MTAudioProcessingTapMutableFlags flags) throws OSStatusException { CMTimeRange timeRangePtr = new CMTimeRange(); MachineSizedSIntPtr numberFramesPtr = new MachineSizedSIntPtr(); OSStatus status = getSourceAudio0(numberFrames, bufferList, flags, timeRangePtr, numberFramesPtr); OSStatusException.throwIfNecessary(status); this.lastTimeRange = timeRangePtr; return numberFramesPtr.get(); }
public double[] getLineDashD() { MachineSizedSIntPtr countPtr = new MachineSizedSIntPtr(); getLineDash(null, countPtr, null); int count = (int) countPtr.get(); MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, count); getLineDash(patternPtr, null, null); return patternPtr.toDoubleArray(count); }
public float[] getLineDashF() { MachineSizedSIntPtr countPtr = new MachineSizedSIntPtr(); getLineDash(null, countPtr, null); int count = (int) countPtr.get(); MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, count); getLineDash(patternPtr, null, null); return patternPtr.toFloatArray(count); }
/** * @since Available in iOS 8.0 and later. * @throws NSErrorException */ public NSURLRelationship getRelationshipOfDirectoryToItem(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, NSURL url) throws NSErrorException { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); NSError.NSErrorPtr err = new NSError.NSErrorPtr(); if (getRelationshipOfDirectoryToItem(ptr, directory, domainMask, url, err)) { return NSURLRelationship.valueOf(ptr.get()); } if (err.get() != null) { throw new NSErrorException(err.get()); } return null; } /*<methods>*/
/** * @since Available in iOS 8.0 and later. * @throws NSErrorException */ public NSURLRelationship getRelationshipOfDirectoryToItem(NSURL directoryURL, NSURL otherURL) throws NSErrorException { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); NSError.NSErrorPtr err = new NSError.NSErrorPtr(); if (getRelationshipOfDirectoryToItem(ptr, directoryURL, otherURL, err)) { return NSURLRelationship.valueOf(ptr.get()); } if (err.get() != null) { throw new NSErrorException(err.get()); } return null; } /**
/** * Copies {@code dst.length} ints from the memory pointed to by this * {@link MachineSizedSIntPtr} to {@code dst}. Does the proper * narrowing {@code long} to {@code int} conversion if running on a 64-bit * platform. * * @param dst the destination. */ public void get(int[] dst) { get(dst, 0, dst.length); }
/** * Copies {@code dst.length} longs from the memory pointed to by this * {@link MachineSizedSIntPtr} to {@code dst}. Does signed {@code int} to * {@code long} conversion if running on a 32-bit platform. * * @param dst the destination. */ public void get(long[] dst) { get(dst, 0, dst.length); }
/** * Copies {@code dst.length} ints from the memory pointed to by this * {@link MachineSizedSIntPtr} to {@code dst}. Does the proper * narrowing {@code long} to {@code int} conversion if running on a 64-bit * platform. * * @param dst the destination. */ public void get(int[] dst) { get(dst, 0, dst.length); }
/** * @since Available in iOS 2.0 and later. */ public long getLong(long index) { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); if (getInteger(index, ptr)) { return ptr.get(); } return 0; } public boolean hasDouble(long index) {
/** * @since Available in iOS 2.0 and later. */ public long getLong(String key) { MachineSizedSIntPtr ptr = new MachineSizedSIntPtr(); if (getInteger(key, ptr)) { return ptr.get(); } return 0; } public boolean hasDouble(String key) {
/** * @throws OSStatusException * @since Available in iOS 6.0 and later. */ public long getSourceAudio(long numberFrames, AudioBufferList bufferList, MTAudioProcessingTapMutableFlags flags) throws OSStatusException { CMTimeRange timeRangePtr = new CMTimeRange(); MachineSizedSIntPtr numberFramesPtr = new MachineSizedSIntPtr(); OSStatus status = getSourceAudio0(numberFrames, bufferList, flags, timeRangePtr, numberFramesPtr); OSStatusException.throwIfNecessary(status); this.lastTimeRange = timeRangePtr; return numberFramesPtr.get(); }
public float[] getLineDashF() { MachineSizedSIntPtr countPtr = new MachineSizedSIntPtr(); getLineDash(null, countPtr, null); int count = (int) countPtr.get(); MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, count); getLineDash(patternPtr, null, null); return patternPtr.toFloatArray(count); }