be.cardon.nativecall
Class NativeUnicodeString

java.lang.Object
  extended by be.cardon.nativecall.NativeObject
      extended by be.cardon.nativecall.NativeUnicodeString

public class NativeUnicodeString
extends NativeObject

NULL terminated Unicode string (UTF-16LE) native object.


Field Summary
 
Fields inherited from class be.cardon.nativecall.NativeObject
BYTE_SIZE, INT_SIZE, LLC
 
Method Summary
static NativeUnicodeString newInstance(java.lang.String str)
          Copy a given string to new allocated NULL terminated Unicode (2 bytes/char)string wchar[].
 
Methods inherited from class be.cardon.nativecall.NativeObject
finalize, getAddress, getLength, isReadOnly, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static NativeUnicodeString newInstance(java.lang.String str)
                                       throws NativeCallException
Copy a given string to new allocated NULL terminated Unicode (2 bytes/char)string wchar[]. The given string is converted to UTF-16 little endian sinds x386 processor works natively in little endian (Java works in big endian on any platform). The native string is terminated with 1 NULL character (= 2 bytes NULL).

Parameters:
str - String to be copied.
Returns:
{code NativeUnicodeString} native object. This object extends the NativeObject.
Throws:
NativeCallException