本文整理了Java中org.robovm.rt.bro.ptr.BytePtr.toBytePtrZ()
方法的一些代码示例,展示了BytePtr.toBytePtrZ()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BytePtr.toBytePtrZ()
方法的具体详情如下:
包路径:org.robovm.rt.bro.ptr.BytePtr
类名称:BytePtr
方法名:toBytePtrZ
[英]Converts the specified String to a NUL-terminated C string using the default Charset. Illegal characters will be replaced with '?' in the result. The memory will be allocated on the GCed heaped. This assumes that the default Charset is an 8-bit encoding or a variable length encoding with 8-bits as smallest bit length such as UTF-8.
[中]
代码示例来源:origin: robovm/robovm
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the specified {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
*
* @param s the {@link String} to convert.
* @param charset the {@link Charset} to use. Must be an 8-bit or variable
* length character encoding with 8-bits as smallest value and that
* can be NUL-terminated (e.g. UTF-8).
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s, Charset charset) {
return toBytePtrZ(s, charset, false);
}
代码示例来源:origin: robovm/robovm
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the default {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
* This assumes that the default {@link Charset} is an 8-bit encoding or a
* variable length encoding with 8-bits as smallest bit length such as
* UTF-8.
*
* @param s the {@link String} to convert.
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s) {
return toBytePtrZ(s, Charset.defaultCharset(), false);
}
代码示例来源:origin: robovm/robovm
/**
* @since Available in iOS 2.0 and later.
*/
public static SCNetworkReachability create(String nodename) {
long refconId = SCNetworkReachability.refconId.getAndIncrement();
BytePtr ptr = BytePtr.toBytePtrZ(nodename);
SCNetworkReachability reachability = create(null, ptr);
reachability.localRefconId = refconId;
return reachability;
}
/**
代码示例来源:origin: MobiVM/robovm
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the specified {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
*
* @param s the {@link String} to convert.
* @param charset the {@link Charset} to use. Must be an 8-bit or variable
* length character encoding with 8-bits as smallest value and that
* can be NUL-terminated (e.g. UTF-8).
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s, Charset charset) {
return toBytePtrZ(s, charset, false);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the specified {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
*
* @param s the {@link String} to convert.
* @param charset the {@link Charset} to use. Must be an 8-bit or variable
* length character encoding with 8-bits as smallest value and that
* can be NUL-terminated (e.g. UTF-8).
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s, Charset charset) {
return toBytePtrZ(s, charset, false);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the specified {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
*
* @param s the {@link String} to convert.
* @param charset the {@link Charset} to use. Must be an 8-bit or variable
* length character encoding with 8-bits as smallest value and that
* can be NUL-terminated (e.g. UTF-8).
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s, Charset charset) {
return toBytePtrZ(s, charset, false);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the specified {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
*
* @param s the {@link String} to convert.
* @param charset the {@link Charset} to use. Must be an 8-bit or variable
* length character encoding with 8-bits as smallest value and that
* can be NUL-terminated (e.g. UTF-8).
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s, Charset charset) {
return toBytePtrZ(s, charset, false);
}
代码示例来源:origin: org.robovm/robovm-rt-common
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the specified {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
*
* @param s the {@link String} to convert.
* @param charset the {@link Charset} to use. Must be an 8-bit or variable
* length character encoding with 8-bits as smallest value and that
* can be NUL-terminated (e.g. UTF-8).
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s, Charset charset) {
return toBytePtrZ(s, charset, false);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the default {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
* This assumes that the default {@link Charset} is an 8-bit encoding or a
* variable length encoding with 8-bits as smallest bit length such as
* UTF-8.
*
* @param s the {@link String} to convert.
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s) {
return toBytePtrZ(s, Charset.defaultCharset(), false);
}
代码示例来源:origin: MobiVM/robovm
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the default {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
* This assumes that the default {@link Charset} is an 8-bit encoding or a
* variable length encoding with 8-bits as smallest bit length such as
* UTF-8.
*
* @param s the {@link String} to convert.
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s) {
return toBytePtrZ(s, Charset.defaultCharset(), false);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the default {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
* This assumes that the default {@link Charset} is an 8-bit encoding or a
* variable length encoding with 8-bits as smallest bit length such as
* UTF-8.
*
* @param s the {@link String} to convert.
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s) {
return toBytePtrZ(s, Charset.defaultCharset(), false);
}
代码示例来源:origin: org.robovm/robovm-rt-common
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the default {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
* This assumes that the default {@link Charset} is an 8-bit encoding or a
* variable length encoding with 8-bits as smallest bit length such as
* UTF-8.
*
* @param s the {@link String} to convert.
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s) {
return toBytePtrZ(s, Charset.defaultCharset(), false);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Converts the specified {@link String} to a NUL-terminated C string using
* the default {@link Charset}. Illegal characters will be replaced with
* '?' in the result. The memory will be allocated on the GCed heaped.
* This assumes that the default {@link Charset} is an 8-bit encoding or a
* variable length encoding with 8-bits as smallest bit length such as
* UTF-8.
*
* @param s the {@link String} to convert.
* @return a {@link BytePtr} which points to the first character in the result.
*/
public static BytePtr toBytePtrZ(String s) {
return toBytePtrZ(s, Charset.defaultCharset(), false);
}
代码示例来源:origin: com.gluonhq/robovm-cocoatouch
/**
* @since Available in iOS 2.0 and later.
*/
public SCNetworkReachability(String nodename) {
long refconId = SCNetworkReachability.refconId.getAndIncrement();
BytePtr ptr = BytePtr.toBytePtrZ(nodename);
long reachability = create(null, ptr);
localRefconId = refconId;
setHandle(reachability);
}
/**
代码示例来源:origin: com.mobidevelop.robovm/robovm-cocoatouch
/**
* @since Available in iOS 2.0 and later.
*/
public SCNetworkReachability(String nodename) {
long refconId = SCNetworkReachability.refconId.getAndIncrement();
BytePtr ptr = BytePtr.toBytePtrZ(nodename);
long reachability = create(null, ptr);
localRefconId = refconId;
setHandle(reachability);
}
/**
内容来源于网络,如有侵权,请联系作者删除!