public CAFPacketTableHeader setPacketDescriptions(byte[] packetDescriptions) { BytePtr ptr = new BytePtr(); ptr.set(packetDescriptions); setPacketDescriptions0(ptr); return this; } /*<members>*/
public static CFNumber valueOf(byte value) { return create(null, CFNumberType.SInt8Type, new BytePtr(value).as(VoidPtr.class)); } public static CFNumber valueOf(short value) {
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
public void setLineBreakMode(CTLineBreakMode lineBreakMode) { BytePtr ptr = new BytePtr((byte)lineBreakMode.value()); setValueForSpecifier(CTParagraphStyleSpecifier.LineBreakMode, ptr.as(VoidPtr.class)); } public void setBaseWritingDirection(CTWritingDirection writingDirection) {
public void setAlignment(CTTextAlignment alignment) { BytePtr ptr = new BytePtr((byte)alignment.value()); setValueForSpecifier(CTParagraphStyleSpecifier.Alignment, ptr.as(VoidPtr.class)); } public void setLineBreakMode(CTLineBreakMode lineBreakMode) {
public void setBaseWritingDirection(CTWritingDirection writingDirection) { BytePtr ptr = new BytePtr((byte)writingDirection.value()); setValueForSpecifier(CTParagraphStyleSpecifier.BaseWritingDirection, ptr.as(VoidPtr.class)); } public void setFirstLineHeadIndent(double lineHeadIndent) {
/** * @throws OSStatusException * @since Available in iOS 4.0 and later. */ public CMTextJustification getHorizontalJustification() throws OSStatusException { BytePtr ptr = new BytePtr(); OSStatus status = getJustification0(ptr, null); OSStatusException.throwIfNecessary(status); return CMTextJustification.valueOf(ptr.get()); } /**
/** * @throws OSStatusException * @since Available in iOS 4.0 and later. */ public CMTextJustification getVerticalJustification() throws OSStatusException { BytePtr ptr = new BytePtr(); OSStatus status = getJustification0(null, ptr); OSStatusException.throwIfNecessary(status); return CMTextJustification.valueOf(ptr.get()); } /**
/** * @throws OSStatusException * @since Available in iOS 5.0 and later. */ public String getPeerDomainName() throws OSStatusException { BytePtr peerNamePtr = new BytePtr(); MachineSizedUIntPtr peerNameLenPtr = new MachineSizedUIntPtr(); OSStatus status = getPeerDomainName0(peerNamePtr, peerNameLenPtr); OSStatusException.throwIfNecessary(status); return peerNamePtr.toStringZ(); } /**
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public byte[] rawSign(SecPadding padding, byte[] dataToSign) throws OSStatusException { if (dataToSign == null) { throw new NullPointerException("dataToSign"); } BytePtr sigPtr = new BytePtr(); MachineSizedUIntPtr sigLenPtr = new MachineSizedUIntPtr(); OSStatus status = rawSign0(padding, VM.getArrayValuesAddress(dataToSign), dataToSign.length, sigPtr, sigLenPtr); OSStatusException.throwIfNecessary(status); return sigPtr.toByteArray((int)sigLenPtr.get()); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGImageAlphaInfo alphaInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, new CGBitmapInfo(alphaInfo.value())); } /**
public CTWritingDirection getBaseWritingDirection() { BytePtr ptr = new BytePtr(); getValueForSpecifier(CTParagraphStyleSpecifier.BaseWritingDirection, BytePtr.sizeOf(), ptr.as(VoidPtr.class)); return CTWritingDirection.valueOf(ptr.get()); } public double getFirstLineHeadIndent() {
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public byte[] encrypt(SecPadding padding, byte[] plainText) throws OSStatusException { if (plainText == null) { throw new NullPointerException("plainText"); } BytePtr cipherTextPtr = new BytePtr(); MachineSizedUIntPtr cipherTextLenPtr = new MachineSizedUIntPtr(); OSStatus status = encrypt0(padding, VM.getArrayValuesAddress(plainText), plainText.length, cipherTextPtr, cipherTextLenPtr); OSStatusException.throwIfNecessary(status); return cipherTextPtr.toByteArray((int)cipherTextLenPtr.get()); } /**
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public byte[] decrypt(SecPadding padding, byte[] cipherText) throws OSStatusException { if (cipherText == null) { throw new NullPointerException("cipherText"); } BytePtr plainTextPtr = new BytePtr(); MachineSizedUIntPtr plainTextLenPtr = new MachineSizedUIntPtr(); OSStatus status = decrypt0(padding, VM.getArrayValuesAddress(cipherText), cipherText.length, plainTextPtr, plainTextLenPtr); OSStatusException.throwIfNecessary(status); return plainTextPtr.toByteArray((int)plainTextLenPtr.get()); } /*<methods>*/
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public byte[] readBytes(boolean useCache, long startingByte, int bytesToRead) throws OSStatusException { IntPtr numBytesPtr = new IntPtr(); BytePtr ptr = new BytePtr(); OSStatus status = readBytes0(useCache, startingByte, numBytesPtr, ptr); OSStatusException.throwIfNecessary(status); return ptr.toByteArray(numBytesPtr.get()); } /**
public CTTextAlignment getAlignment() { BytePtr ptr = new BytePtr(); getValueForSpecifier(CTParagraphStyleSpecifier.Alignment, BytePtr.sizeOf(), ptr.as(VoidPtr.class)); return CTTextAlignment.valueOf(ptr.get()); } public CTLineBreakMode getLineBreakMode() {
public CTLineBreakMode getLineBreakMode() { BytePtr ptr = new BytePtr(); getValueForSpecifier(CTParagraphStyleSpecifier.LineBreakMode, BytePtr.sizeOf(), ptr.as(VoidPtr.class)); return CTLineBreakMode.valueOf(ptr.get()); } public CTWritingDirection getBaseWritingDirection() {
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public byte[] convertBuffer(byte[] buffer) throws OSStatusException { BytePtr bytePtr = new BytePtr(); IntPtr sizePtr = new IntPtr(buffer.length); OSStatus status = convertBuffer0(buffer.length, VM.getArrayValuesAddress(buffer), sizePtr, bytePtr); OSStatusException.throwIfNecessary(status); return bytePtr.toByteArray(sizePtr.get()); } /**
/** * @throws OSStatusException * @since Available in iOS 4.0 and later. */ public CMTextJustification getVerticalJustification() throws OSStatusException { BytePtr ptr = new BytePtr(); OSStatus status = getJustification0(null, ptr); OSStatusException.throwIfNecessary(status); return CMTextJustification.valueOf(ptr.get()); } /**