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