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(ifwideis true) orchar.NativeString(String string, String encoding) Create a native string (NUL-terminated array ofchar), using the requested encoding. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcharcharAt(int index) intbooleaninthashCode()intlength()subSequence(int start, int end) toString()Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon 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(ifwideis 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:
toStringin SchnittstelleCharSequence- Setzt außer Kraft:
toStringin KlasseObject
-
getPointer
-
charAt
public char charAt(int index) - Angegeben von:
charAtin SchnittstelleCharSequence
-
length
public int length()- Angegeben von:
lengthin SchnittstelleCharSequence
-
subSequence
- Angegeben von:
subSequencein SchnittstelleCharSequence
-
compareTo
- Angegeben von:
compareToin SchnittstelleComparable
-