|
JNA API> 3.2.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jna.NativeString
class NativeString
Provides a temporary allocation of an immutable C string
(const char*
or const wchar_t*
) for use when
converting a Java String into a native memory function argument.
Constructor Summary | |
---|---|
NativeString(String string)
Create a native string (NUL-terminated array of char ). |
|
NativeString(String string,
boolean wide)
Create a native string as a NUL-terminated array of wchar_t
(if wide is true) or char . |
Method Summary | |
---|---|
char |
charAt(int index)
|
int |
compareTo(Object other)
|
boolean |
equals(Object other)
|
Pointer |
getPointer()
|
int |
hashCode()
|
int |
length()
|
CharSequence |
subSequence(int start,
int end)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NativeString(String string)
char
).
If the system property jna.encoding
is set, its value will
be used to encode the native string. If not set or if the encoding
is unavailable, the default platform encoding will be used.
public NativeString(String string, boolean wide)
wchar_t
(if wide
is true) or char
.
If the system property jna.encoding
is set, its value will
be used to encode the native char
string.
If not set or if the encoding is unavailable, the default platform
encoding will be used.
string
- value to write to native memorywide
- whether to store the String as wchar_t
Method Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
public String toString()
toString
in interface CharSequence
toString
in class Object
public Pointer getPointer()
public char charAt(int index)
charAt
in interface CharSequence
public int length()
length
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public int compareTo(Object other)
compareTo
in interface Comparable
|
JNA API> 3.2.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |