Package com.sun.jna
Klasse NativeString
java.lang.Object
com.sun.jna.NativeString
- Alle implementierten Schnittstellen:
CharSequence
,Comparable
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.- Autor:
- Todd Fast, todd.fast@sun.com, twall@users.sf.net
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungNativeString
(WString string) Create a native string as a NUL-terminated array ofwchar_t
.NativeString
(String string) Create a native string (NUL-terminated array ofchar
).NativeString
(String string, boolean wide) Create a native string as a NUL-terminated array ofwchar_t
(ifwide
is true) orchar
.NativeString
(String string, String encoding) Create a native string (NUL-terminated array ofchar
), using the requested encoding. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungchar
charAt
(int index) int
boolean
int
hashCode()
int
length()
subSequence
(int start, int end) toString()
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden java.lang.CharSequence
chars, codePoints, isEmpty
-
Felddetails
-
WIDE_STRING
- Siehe auch:
-
-
Konstruktordetails
-
NativeString
Create a native string (NUL-terminated array ofchar
).Uses the encoding returned by
Native.getDefaultStringEncoding()
. -
NativeString
Create a native string as a NUL-terminated array ofwchar_t
(ifwide
is true) orchar
.If not
wide
, the encoding is obtained fromNative.getDefaultStringEncoding()
.- Parameter:
string
- value to write to native memorywide
- whether to store the String aswchar_t
-
NativeString
Create a native string as a NUL-terminated array ofwchar_t
. -
NativeString
Create a native string (NUL-terminated array ofchar
), using the requested encoding.
-
-
Methodendetails
-
hashCode
public int hashCode() -
equals
-
toString
- Angegeben von:
toString
in SchnittstelleCharSequence
- Setzt außer Kraft:
toString
in KlasseObject
-
getPointer
-
charAt
public char charAt(int index) - Angegeben von:
charAt
in SchnittstelleCharSequence
-
length
public int length()- Angegeben von:
length
in SchnittstelleCharSequence
-
subSequence
- Angegeben von:
subSequence
in SchnittstelleCharSequence
-
compareTo
- Angegeben von:
compareTo
in SchnittstelleComparable
-