Top Description Fields Constructors Methods
com.sun.jna

public Class StringArray

extends Memory
Class Inheritance
Imports
java.util.ArrayList, .List

Handle native array of char* or wchar_t* type by managing allocation/disposal of native strings within an array of pointers. An extra NULL pointer is always added to the end of the native pointer array for convenience.

Field Summary

Modifier and TypeField and Description
private List<E>
private Object[]
private boolean
Inherited from com.sun.jna.Memory:
size

Constructor Summary

AccessConstructor and Description
public
StringArray(String[] strings)

Create a native array of strings.

public
StringArray(String[] strings, boolean wide)

Create a native array of wide strings.

public
StringArray(WString[] strings)

Create a native array of wide strings.

private
StringArray(Object[] strings, boolean wide)

Method Summary

Modifier and TypeMethod and Description
public void
read()

Read back from native memory.

Inherited from com.sun.jna.Memory:
alignboundsCheckclearfinalizefreegetBytegetByteBuffergetChargetDoublegetFloatgetIntgetLonggetPointergetShortgetSizegetStringisValidmallocreadreadreadreadreadreadreadsetBytesetCharsetDoublesetFloatsetIntsetLongsetPointersetShortsetStringsharesharetoStringwritewritewritewritewritewritewrite

Field Detail

nativesback to summary
private List<E> natives
originalback to summary
private Object[] original
wideback to summary
private boolean wide

Constructor Detail

StringArrayback to summary
public StringArray(String[] strings)

Create a native array of strings.

StringArrayback to summary
public StringArray(String[] strings, boolean wide)

Create a native array of wide strings.

StringArrayback to summary
public StringArray(WString[] strings)

Create a native array of wide strings.

StringArrayback to summary
private StringArray(Object[] strings, boolean wide)

Method Detail

readback to summary
public void read()

Read back from native memory.