|
JNA API> 3.3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 charstring.
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 Objectpublic boolean equals(Object other)
equals in class Objectpublic String toString()
toString in interface CharSequencetoString in class Objectpublic Pointer getPointer()
public char charAt(int index)
charAt in interface CharSequencepublic int length()
length in interface CharSequence
public CharSequence subSequence(int start,
int end)
subSequence in interface CharSequencepublic int compareTo(Object other)
compareTo in interface Comparable
|
JNA API> 3.3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||