com.jniwrapper
Class Char

java.lang.Object
  |
  +--com.jniwrapper.Parameter
        |
        +--com.jniwrapper.Char

public class Char
extends Parameter

Represents char value and type.


Constructor Summary
Char()
          Constructs character with \0 value.
Char(char c)
          Constructs character with specified value.
Char(Char t)
          Constructs a copy of Char object.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
          Compares this Parameter object to a given object.
 int getLength()
          Returns a length of the parameter in memory.
 char getValue()
          Returns character value
 void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Reads this parameter from a specified data source.
 void setValue(char value)
          Sets character value.
 Char toChar()
           
 java.lang.String toString()
           
 void write(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Writes this parameter to a specified data source.
 
Methods inherited from class com.jniwrapper.Parameter
acceptIOPerformer, asReturnValue, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Char

public Char()
Constructs character with \0 value.


Char

public Char(char c)
Constructs character with specified value.


Char

public Char(Char t)
Constructs a copy of Char object.

Method Detail

getValue

public char getValue()
Returns character value


setValue

public void setValue(char value)
Sets character value.

Throws:
java.lang.IllegalArgumentException - if character is not within 0..255 range.
See Also:
WideChar

getLength

public int getLength()
Description copied from class: Parameter
Returns a length of the parameter in memory. This method is analogous to C sizeof() operator.

Specified by:
getLength in class Parameter

clone

public java.lang.Object clone()
Specified by:
clone in class Parameter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toChar

public Char toChar()

equals

public boolean equals(java.lang.Object obj)
Description copied from class: Parameter
Compares this 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.

Overrides:
equals in class Parameter
Parameters:
obj - value to compare this object to
Returns:
true if two objects are equal.

write

public void write(DataBuffer stackBuffer,
                  int offset,
                  boolean invokedByCallback)
           throws MemoryAccessViolationException
Description copied from class: Parameter
Writes this parameter to a specified data source.

Specified by:
write in class Parameter
MemoryAccessViolationException

read

public void read(DataBuffer stackBuffer,
                 int offset,
                 boolean invokedByCallback)
          throws MemoryAccessViolationException
Description copied from class: Parameter
Reads this parameter from a specified data source.

Specified by:
read in class Parameter
MemoryAccessViolationException