com.jniwrapper
Class ExternalStringArray

java.lang.Object
  extended by com.jniwrapper.ExternalStringArray

public class ExternalStringArray
extends java.lang.Object

This class allows reading external memory block that contains a sequence of null-terminated strings. The read sequence is represented as an array of strings.


Constructor Summary
ExternalStringArray(Pointer.Void handle)
          Creates an array of strings from the memory block pointed by the handle.
ExternalStringArray(Pointer.Void handle, CharacterEncoding characterEncoding)
          Creates an array of strings from the memory block pointed by the handle.
 
Method Summary
 int countElements()
          Gets the number of elements in the array.
 java.lang.String getElement(int i)
          Gets the string at the specified position in the array.
 java.lang.String[] getStrings()
          Gets the array of strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalStringArray

public ExternalStringArray(Pointer.Void handle)
Creates an array of strings from the memory block pointed by the handle.


ExternalStringArray

public ExternalStringArray(Pointer.Void handle,
                           CharacterEncoding characterEncoding)
Creates an array of strings from the memory block pointed by the handle.

Parameters:
handle - is the pointer to the beginning of the memory block.
Method Detail

getStrings

public java.lang.String[] getStrings()
Gets the array of strings.

Returns:
the array of strings.

getElement

public java.lang.String getElement(int i)
Gets the string at the specified position in the array.

Parameters:
i - specifies the position of getting string in the array.
Returns:
the string at the specified position in the array.

countElements

public int countElements()
Gets the number of elements in the array.

Returns:
the number of elements in the array.