public long[] getExtendedPixels() { MachineSizedUIntPtr left = new MachineSizedUIntPtr(); MachineSizedUIntPtr right = new MachineSizedUIntPtr(); MachineSizedUIntPtr top = new MachineSizedUIntPtr(); MachineSizedUIntPtr bottom = new MachineSizedUIntPtr(); getExtendedPixels(left, right, top, bottom); return new long[] {left.get(), right.get(), top.get(), bottom.get()}; } /*<methods>*/
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public long getNumberSupportedCiphers() throws OSStatusException { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); OSStatus status = getNumberSupportedCiphers0(ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); } /**
public byte[] decodeBytes() { MachineSizedUIntPtr lengthPtr = new MachineSizedUIntPtr(); BytePtr bytePtr = decodeBytes0(lengthPtr); return bytePtr.toByteArray((int)lengthPtr.get()); } public void encodeObject(String key, NSObject value) {
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public long getNumberEnabledCiphers() throws OSStatusException { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); OSStatus status = getNumberEnabledCiphers0(ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); } /**
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public int getDatagramWriteSize() throws OSStatusException { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); OSStatus status = getDatagramWriteSize0(ptr); OSStatusException.throwIfNecessary(status); return (int)ptr.get(); } /**
public byte[] decodeBytes(String key) { MachineSizedUIntPtr lengthPtr = new MachineSizedUIntPtr(); BytePtr bytesPtr = decodeBytes0(key, lengthPtr); return bytesPtr.toByteArray((int)lengthPtr.get()); } /**
/** * @since Available in iOS 4.0 and later. */ public @MachineSizedUInt long getMagicCookieSize() { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); getMagicCookie0(ptr); return ptr.get(); } /**
/** * @since Available in iOS 4.0 and later. */ public @MachineSizedUInt long getFormatListSize() { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); getFormatList0(ptr); return ptr.get(); } /**
public void setVertexBuffers(MTLBuffer[] buffers, long[] offsets, NSRange range) { MTLBuffer.MTLBufferPtr bptr = new MTLBuffer.MTLBufferPtr(); bptr.set(buffers); MachineSizedUIntPtr lptr = new MachineSizedUIntPtr(); lptr.set(offsets); setVertexBuffers(bptr, lptr, range); } public void setVertexTextures(MTLTexture[] textures, NSRange range) {
public void setFragmentBuffers(MTLBuffer[] buffers, long[] offsets, NSRange range) { MTLBuffer.MTLBufferPtr bptr = new MTLBuffer.MTLBufferPtr(); bptr.set(buffers); MachineSizedUIntPtr lptr = new MachineSizedUIntPtr(); lptr.set(offsets); setFragmentBuffers(bptr, lptr, range); } public void setFragmentTextures(MTLTexture[] textures, NSRange range) {
/** * @since Available in iOS 4.0 and later. */ @WeaklyLinked public @MachineSizedUInt long getChannelLayoutSize() { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); getChannelLayout0(ptr); return ptr.get(); } /**
/** * @throws OSStatusException * @since Available in iOS 4.0 and later. */ public long[] getSampleSizeArray(@MachineSizedSInt long sizeArrayEntries) throws OSStatusException { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); OSStatus status = getSampleSizeArray0(sizeArrayEntries, ptr, null); OSStatusException.throwIfNecessary(status); return ptr.toLongArray((int)sizeArrayEntries); } /**
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public long write(byte[] data) throws OSStatusException { MachineSizedUIntPtr ptr = new MachineSizedUIntPtr(); OSStatus status = write0(VM.getArrayValuesAddress(data), data.length, ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); } /**
public static String getMachineString () { BytePtr name = BytePtr.toBytePtrAsciiZ("hw.machine"); MachineSizedUIntPtr size = new MachineSizedUIntPtr(); sysctlbyname(name, null, size, null, 0); BytePtr machine = Struct.allocate(BytePtr.class, (int) size.get()); sysctlbyname(name, machine.as(VoidPtr.class), size, null, 0); return machine.toStringAsciiZ(); }
public static String getMachineString () { BytePtr name = BytePtr.toBytePtrAsciiZ("hw.machine"); MachineSizedUIntPtr size = new MachineSizedUIntPtr(); sysctlbyname(name, null, size, null, 0); BytePtr machine = Struct.allocate(BytePtr.class, (int) size.get()); sysctlbyname(name, machine.as(VoidPtr.class), size, null, 0); return machine.toStringAsciiZ(); }
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public short[] getSupportedCiphers() throws OSStatusException { ShortPtr ciphersPtr = new ShortPtr(); MachineSizedUIntPtr numCiphersPtr = new MachineSizedUIntPtr(); OSStatus status = getSupportedCiphers0(ciphersPtr, numCiphersPtr); OSStatusException.throwIfNecessary(status); return ciphersPtr.toShortArray((int)numCiphersPtr.get()); } /**
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public String getPeerID() throws OSStatusException { BytePtr.BytePtrPtr peerIDPtr = new BytePtr.BytePtrPtr(); MachineSizedUIntPtr peerIDLenPtr = new MachineSizedUIntPtr(); OSStatus status = getPeerID0(peerIDPtr, peerIDLenPtr); OSStatusException.throwIfNecessary(status); return peerIDPtr.get().toStringZ(); } /**
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public byte[] read(int dataLength) throws OSStatusException { BytePtr dataPtr = Struct.allocate(BytePtr.class, dataLength); MachineSizedUIntPtr processedPtr = new MachineSizedUIntPtr(); OSStatus status = read0(dataPtr, dataLength, processedPtr); OSStatusException.throwIfNecessary(status); return dataPtr.toByteArray((int)processedPtr.get()); } /**
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public short[] getEnabledCiphers() throws OSStatusException { ShortPtr ciphersPtr = new ShortPtr(); MachineSizedUIntPtr numCiphersPtr = new MachineSizedUIntPtr(); OSStatus status = getEnabledCiphers0(ciphersPtr, numCiphersPtr); OSStatusException.throwIfNecessary(status); return ciphersPtr.toShortArray((int)numCiphersPtr.get()); } /**
public void setBuffers(MTLBuffer[] buffers, long[] offsets, @ByVal NSRange range) { MTLBuffer.MTLBufferPtr bptr = new MTLBuffer.MTLBufferPtr(); bptr.set(buffers); MachineSizedUIntPtr lptr = new MachineSizedUIntPtr(); lptr.set(offsets); setBuffers(bptr, lptr, range); } public void setTextures(MTLTexture[] textures, @ByVal NSRange range) {