|
JNA API> 3.5.2-SNAPSHOT | |||||||||
| 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(java.lang.String string)
Create a native string (NUL-terminated array of char). |
|
NativeString(java.lang.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(java.lang.Object other)
|
boolean |
equals(java.lang.Object other)
|
Pointer |
getPointer()
|
int |
hashCode()
|
int |
length()
|
java.lang.CharSequence |
subSequence(int start,
int end)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NativeString(java.lang.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(java.lang.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 java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic Pointer getPointer()
public char charAt(int index)
charAt in interface java.lang.CharSequencepublic int length()
length in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparable
|
JNA API> 3.5.2-SNAPSHOT | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||