public class StringArray extends Parameter
StringArray(boolean unicode)
constructor.LICENSE_TYPE, V
Constructor and Description |
---|
StringArray()
Constructs a string array with the maximum length of 1024 characters.
|
StringArray(boolean unicode)
Constructs a string array with a specified character type and the maximum length of 1024 characters.
|
StringArray(int maxLen)
Constructs a string array with a specified maximum length.
|
StringArray(int maxLen,
boolean unicode)
Constructs a string array with a specified maximum length and character type.
|
StringArray(java.lang.String[] s)
Constructs a string array with a specified value.
|
StringArray(java.lang.String[] s,
boolean unicode)
Constructs a string array with a specified value and character type.
|
StringArray(java.lang.String[] s,
int maxLen)
Constructs a string array with a specified value and maximum length.
|
StringArray(java.lang.String[] s,
int maxLen,
boolean unicode)
Constructs a string array with a specified value, maximum length and character
type.
|
StringArray(StringArray s)
Constructs a copy of the passed instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
acceptIOPerformer(IOPerformer performer,
DataBuffer buffer,
int initialOffset,
boolean isReadOperation,
boolean invokedByCallback)
Implementation of a Visitor pattern for parameter IO.
|
protected Parameter |
asReturnValue()
Returns a parameter that represents this one as a return value.
|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj)
Compares this
Parameter object to a given object. |
protected int |
getAlignedLength()
Returns a parameter length in bytes aligned to default alignment.
|
int |
getAlignmentRequirement() |
protected DataBuffer |
getDataBuffer()
Returns a current data storage.
|
protected int |
getDataBufferOffset()
Returns a current offset within data storage.
|
java.lang.String |
getDebugInfo()
Return debug info for JNIWrapper parameter.
|
int |
getLength()
Returns the length of the parameter in memory.
|
int |
getMaxLength() |
java.lang.String[] |
getValue() |
int |
hashCode() |
boolean |
isUnicode() |
void |
pop(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Default implementation that does nothing because most primitive types do
nothing on pop.
|
void |
push(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes a parameter to a function stacks.
|
void |
read(byte[] arr,
int offset)
Reads the parameter value from a byte array.
|
void |
read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Reads this parameter from a specified data source.
|
protected void |
setDataBuffer(DataBuffer newBuffer,
int newOffset,
boolean shouldRead)
Sets the data buffer this parameter should use to store data and an
offset in bytes within that buffer.
|
void |
setValue(java.lang.String[] value) |
void |
write(byte[] arr,
int offset)
Writes the parameter value to a byte array.
|
void |
write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes this parameter to a specified data source.
|
dataBufferAssigned, indent, read, toByteArray
public StringArray()
public StringArray(boolean unicode)
public StringArray(java.lang.String[] s)
public StringArray(java.lang.String[] s, boolean unicode)
public StringArray(int maxLen)
public StringArray(int maxLen, boolean unicode)
public StringArray(java.lang.String[] s, int maxLen)
public StringArray(java.lang.String[] s, int maxLen, boolean unicode)
public StringArray(StringArray s)
s
- a string value to copy from.public boolean isUnicode()
true
if the contained string data is in Unicode;
otherwise false
.public int getLength()
Parameter
sizeof()
operator.protected int getAlignedLength()
Parameter
getAlignedLength
in class Parameter
protected Parameter asReturnValue()
Parameter
asReturnValue
in class Parameter
this
protected int getDataBufferOffset()
Parameter
getDataBufferOffset
in class Parameter
protected DataBuffer getDataBuffer()
Parameter
getDataBuffer
in class Parameter
protected void setDataBuffer(DataBuffer newBuffer, int newOffset, boolean shouldRead)
Parameter
setDataBuffer
in class Parameter
public void write(byte[] arr, int offset)
Parameter
public void read(byte[] arr, int offset)
Parameter
protected void acceptIOPerformer(IOPerformer performer, DataBuffer buffer, int initialOffset, boolean isReadOperation, boolean invokedByCallback)
Parameter
performer
is responsible for reading and writing the
parameter. Users implementing a complex parameter from scratch (i.e. not
by extending a pre-existing class such as Structure
or
Pointer
) may wish to override this method to make a
performer visit object internal parts.acceptIOPerformer
in class Parameter
performer
- a visitor responsible for I/Oing the parameter.buffer
- data buffer for I/O operation.initialOffset
- I/O operation offset of this parameter in the
buffer.public int getAlignmentRequirement()
getAlignmentRequirement
in class Parameter
public void push(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
push
in class Parameter
MemoryAccessViolationException
public void pop(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
pop
in class Parameter
MemoryAccessViolationException
public void write(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
write
in class Parameter
MemoryAccessViolationException
public void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
read
in class Parameter
MemoryAccessViolationException
public boolean equals(java.lang.Object obj)
Parameter
Parameter
object to a given object. Two
Parameter
objects are considered equal if their byte
representations are equal and they are of the same type. Subclasses may
override this method as appropriate.public int getMaxLength()
public void setValue(java.lang.String[] value)
public java.lang.String[] getValue()
public java.lang.String getDebugInfo()
Parameter
getDebugInfo
in class Parameter