| Modifier and Type | Class and Description |
|---|---|
| public static interface | CTypeConversion.
An auto-closable that holds a Java |
| public abstract static class | CTypeConversion.
An auto-closable that holds a Java |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ByteBuffer | asByteBuffer(PointerBase address, int size)
Creates a |
| public static boolean | |
| public static boolean | |
| public static byte | Returns: the C boolean valuethe Java boolean value value)Converts a Java boolean into a C int containing boolean values. |
| public static CTypeConversion. | |
| public static CTypeConversion. | toCString(CharSequence javaString)
Provides access to a C pointer for the provided Java String, encoded with the default charset. |
| public static UnsignedWord | Returns: the byte-sized length of thejavaString when represented as a C string
encoded with the default character set. This length does not include the 0
terminator.managed Java string javaString, CCharPointer to store the bytes of 0 terminated javaString encoded with the default charset
or a nullptr buffer, UnsignedWord size of the buffer or 0 when the buffer is a nullptr bufferSize)Copies the |
| public static UnsignedWord | Returns: the byte-sized length of thejavaString when represented as C string encoded
with the charset character set. This length does not include the 0
terminator.managed Java string javaString, Charset desired character set for the returned string charset, CCharPointer to store the bytes of 0 terminated javaString encoded with charset or a nullptr buffer, UnsignedWord size of the buffer or 0 when the buffer is a nullptr bufferSize)Copies the |
| public static CTypeConversion. | toCStrings(CharSequence[] javaStrings)
Provides access to C pointers for the provided Java Strings, encoded with the default charset. |
| public static String | Returns: a Java stringthe pointer to a 0 terminated C string cString)Decodes a 0 terminated C |
| public static String | Returns: a Java stringthe pointer to a 0 terminated C string cString, UnsignedWord length)Decodes a C |
| public static String | Returns: a Java stringthe pointer to a 0 terminated C string cString, UnsignedWord length, Charset charset)Decodes a C |
| public static String | Returns: a Java stringthe pointer to a UTF-8 encoded, 0 terminated C string utf8String)Decodes a UTF-8 encoded, 0 terminated C |
| CTypeConversion | back to summary |
|---|---|
| private CTypeConversion() | |
| asByteBuffer | back to summary |
|---|---|
| public static ByteBuffer asByteBuffer(PointerBase address, int size) Creates a
| |
| toBoolean | back to summary |
|---|---|
| public static boolean toBoolean(int value) Converts a C int containing boolean values into a Java boolean.
| |
| toBoolean | back to summary |
|---|---|
| public static boolean toBoolean(PointerBase pointer) Converts a C pointer into a Java boolean.
| |
| toCBoolean | back to summary |
|---|---|
| public static byte toCBoolean(boolean value) Converts a Java boolean into a C int containing boolean values.
| |
| toCBytes | back to summary |
|---|---|
| public static CTypeConversion. Provides access to a C pointer for the provided Java byte array.
| |
| toCString | back to summary |
|---|---|
| public static CTypeConversion. Provides access to a C pointer for the provided Java String, encoded with the default charset.
| |
| toCString | back to summary |
|---|---|
| public static UnsignedWord toCString(CharSequence javaString, CCharPointer buffer, UnsignedWord bufferSize) Copies the
When a nullptr is passed as the buffer and the buffer size is zero, then no copying is
performed but the byte-sized length of the
In case the string is larger than the
| |
| toCString | back to summary |
|---|---|
| public static UnsignedWord toCString(CharSequence javaString, Charset charset, CCharPointer buffer, UnsignedWord bufferSize) Copies the
When a nullptr is passed as the buffer and the buffer size is zero, then no copying is
performed but the byte-sized length of the
In case the string is larger than the
| |
| toCStrings | back to summary |
|---|---|
| public static CTypeConversion. Provides access to C pointers for the provided Java Strings, encoded with the default charset.
| |
| toJavaString | back to summary |
|---|---|
| public static String toJavaString(CCharPointer cString) Decodes a 0 terminated C
| |
| toJavaString | back to summary |
|---|---|
| public static String toJavaString(CCharPointer cString, UnsignedWord length) Decodes a C
| |
| toJavaString | back to summary |
|---|---|
| public static String toJavaString(CCharPointer cString, UnsignedWord length, Charset charset) Decodes a C
| |
| utf8ToJavaString | back to summary |
|---|---|
| public static String utf8ToJavaString(CCharPointer utf8String) Decodes a UTF-8 encoded, 0 terminated C
| |
CharSequence as a null-terminated C char[] array.
The C pointer is only valid as long as the auto-closeable has not been closed.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public CCharPointer |
| close | back to summary |
|---|---|
| public void close() Redeclares java. Discards the C pointer.
| |
| get | back to summary |
|---|---|
| public CCharPointer get() Returns the C pointer to the null-terminated C char[] array.
| |
CharSequence[] array as a null-terminated array of
null-terminated C char[]s. The C pointers are only valid as long as the auto-closeable has
not been closed.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract CCharPointerPointer |
| CCharPointerPointerHolder | back to summary |
|---|---|
public CCharPointerPointerHolder()
| |
| close | back to summary |
|---|---|
| public abstract void close() Redeclares java. Discards the C pointer.
| |
| get | back to summary |
|---|---|
| public abstract CCharPointerPointer get() Returns the C pointer to pointers of null-terminated C char[] arrays.
| |