org.robovm.rt.bro.ptr.BytePtr.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(68)

本文整理了Java中org.robovm.rt.bro.ptr.BytePtr.<init>()方法的一些代码示例,展示了BytePtr.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BytePtr.<init>()方法的具体详情如下:
包路径:org.robovm.rt.bro.ptr.BytePtr
类名称:BytePtr
方法名:<init>

BytePtr.<init>介绍

[英]Creates a new BytePtr with a value of 0.
[中]创建值为0的新BytePtr。

代码示例

代码示例来源:origin: robovm/robovm

public CAFPacketTableHeader setPacketDescriptions(byte[] packetDescriptions) {
  BytePtr ptr = new BytePtr();
  ptr.set(packetDescriptions);
  setPacketDescriptions0(ptr);
  return this;
}
/*<members>*/

代码示例来源:origin: robovm/robovm

public static CFNumber valueOf(byte value) {
  return create(null, CFNumberType.SInt8Type, new BytePtr(value).as(VoidPtr.class));
}
public static CFNumber valueOf(short value) {

代码示例来源:origin: robovm/robovm

/**
 * @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);
}
/**

代码示例来源:origin: robovm/robovm

/**
 * @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);
}
/**

代码示例来源:origin: robovm/robovm

public void setLineBreakMode(CTLineBreakMode lineBreakMode) {
  BytePtr ptr = new BytePtr((byte)lineBreakMode.value());
  setValueForSpecifier(CTParagraphStyleSpecifier.LineBreakMode, ptr.as(VoidPtr.class));
}
public void setBaseWritingDirection(CTWritingDirection writingDirection) {

代码示例来源:origin: robovm/robovm

public void setAlignment(CTTextAlignment alignment) {
  BytePtr ptr = new BytePtr((byte)alignment.value());
  setValueForSpecifier(CTParagraphStyleSpecifier.Alignment, ptr.as(VoidPtr.class));
}
public void setLineBreakMode(CTLineBreakMode lineBreakMode) {

代码示例来源:origin: robovm/robovm

public void setBaseWritingDirection(CTWritingDirection writingDirection) {
  BytePtr ptr = new BytePtr((byte)writingDirection.value());
  setValueForSpecifier(CTParagraphStyleSpecifier.BaseWritingDirection, ptr.as(VoidPtr.class));
}
public void setFirstLineHeadIndent(double lineHeadIndent) {

代码示例来源:origin: robovm/robovm

/**
 * @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());
}
/**

代码示例来源:origin: robovm/robovm

/**
 * @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());
} 
/**

代码示例来源:origin: robovm/robovm

/**
 * @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();
}
/**

代码示例来源:origin: robovm/robovm

/**
 * @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());
}
/**

代码示例来源:origin: robovm/robovm

/**
 * @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()));
}
/**

代码示例来源:origin: robovm/robovm

public CTWritingDirection getBaseWritingDirection() {
  BytePtr ptr = new BytePtr();
  getValueForSpecifier(CTParagraphStyleSpecifier.BaseWritingDirection, BytePtr.sizeOf(), ptr.as(VoidPtr.class));
  return CTWritingDirection.valueOf(ptr.get());
}
public double getFirstLineHeadIndent() {

代码示例来源:origin: robovm/robovm

/**
 * @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());
}
/**

代码示例来源:origin: robovm/robovm

/**
 * @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>*/

代码示例来源:origin: robovm/robovm

/**
 * @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());
}
/**

代码示例来源:origin: robovm/robovm

public CTTextAlignment getAlignment() {
  BytePtr ptr = new BytePtr();
  getValueForSpecifier(CTParagraphStyleSpecifier.Alignment, BytePtr.sizeOf(), ptr.as(VoidPtr.class));
  return CTTextAlignment.valueOf(ptr.get());
}
public CTLineBreakMode getLineBreakMode() {

代码示例来源:origin: robovm/robovm

public CTLineBreakMode getLineBreakMode() {
  BytePtr ptr = new BytePtr();
  getValueForSpecifier(CTParagraphStyleSpecifier.LineBreakMode, BytePtr.sizeOf(), ptr.as(VoidPtr.class));
  return CTLineBreakMode.valueOf(ptr.get());
}
public CTWritingDirection getBaseWritingDirection() {

代码示例来源:origin: robovm/robovm

/**
 * @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());
}
/**

代码示例来源:origin: com.mobidevelop.robovm/robovm-cocoatouch

/**
 * @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());
} 
/**

相关文章