|
Servertec Jenie 1.0.1 09/04/2005 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectstec.jenie.NativeObject
stec.jenie.AnsiString
public class AnsiString
Represents a native ANSI string.
Uses 8 bit characters.
ANSI strings can only be passed or returned by functions and callbacks as a pointer to the ANSI string.
WideString| Constructor Summary | |
|---|---|
AnsiString()
Constructs a new ANSI string of default size. |
|
AnsiString(AnsiString value)
Constructs a new ANSI string from the specified ANSI string. |
|
AnsiString(byte[] value)
Constructs a new ANSI string from the specified array of bytes. |
|
AnsiString(byte[] value,
int offset,
int length)
Constructs a new ANSI string from the specified array of bytes. |
|
AnsiString(int size)
Constructs a new ANSI string of specified size. |
|
AnsiString(Pointer pointer)
Constructs a new ANSI string from the specified pointer to an ANSI string. |
|
AnsiString(Pointer pointer,
int size)
Constructs a new ANSI string from the specified pointer to an ANSI string. |
|
AnsiString(java.lang.String value)
Constructs a new ANSI string from the specified string. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns a clone of this ANSI string. |
int |
compareTo(AnsiString string)
Compares this ANSI string to the specified ANSI string. |
int |
compareTo(java.lang.Object object)
Compares this ANSI string to the specified ANSI string. |
int |
compareToIgnoreCase(AnsiString string)
Compares ignoring case this ANSI string to the specified ANSI string. |
boolean |
equals(java.lang.Object object)
Returns whether this ANSI string equals the specified ANSI string. |
boolean |
equalsIgnoreCase(AnsiString string)
Returns whether this ANSI string equals ignoring case the specified ANSI string. |
java.lang.String |
getValue()
Returns a String representation of this ANSI string. |
int |
hashCode()
Returns the hash code of this ANSI string. |
int |
length()
Returns the length in bytes of this ANSI string. |
void |
setValue(AnsiString value)
Sets the value of this ANSI string to the specified ANSI string. |
void |
setValue(byte[] value)
Sets the value of this ANSI string to the specified array of bytes. |
void |
setValue(byte[] value,
int offset,
int length)
Sets the value of this ANSI string to the specified array of bytes. |
void |
setValue(Pointer pointer)
Sets the value of this ANSI string to the ANSI string referenced by the specified pointer to an ANSI string. |
void |
setValue(Pointer pointer,
int size)
Sets the value of this ANSI string to the ANSI string referenced by the specified pointer to an ANSI string. |
void |
setValue(java.lang.String value)
Sets the value of this ANSI string to the specified String. |
java.lang.String |
toString()
Returns a String representation of this ANSI string. |
| Methods inherited from class stec.jenie.NativeObject |
|---|
getAlignment, getNativeAddress, getNativeBuffer, getNativeBufferHandle, setNativeBuffer, setNativeBuffer, setNativeBuffer, size |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnsiString()
throws java.lang.OutOfMemoryError
Constructs a native buffer of 128 bytes in length for ANSI string.
java.lang.OutOfMemoryError - if there is not enough free memory.
public AnsiString(int size)
throws java.lang.OutOfMemoryError,
java.lang.IllegalArgumentException
Constructs a native buffer of size + 1 bytes in length for ANSI string.
size - the size in bytes of the ANSI string.
java.lang.OutOfMemoryError - if there is not enough free memory.
java.lang.IllegalArgumentException - if any of the specified parameters are invalid.
public AnsiString(java.lang.String value)
throws java.lang.OutOfMemoryError
Constructs a native buffer of string length + 1 bytes in length for ANSI string.
value - the string to use.
java.lang.OutOfMemoryError - if there is not enough free memory.
public AnsiString(byte[] value)
throws java.lang.OutOfMemoryError
Constructs a native buffer of byte array length + 1 bytes in length for ANSI string.
value - the array of bytes to use.
java.lang.OutOfMemoryError - if there is not enough free memory.
public AnsiString(byte[] value,
int offset,
int length)
throws java.lang.OutOfMemoryError
Constructs a native buffer of length + 1 bytes in length for ANSI string.
value - the array of bytes to use.offset - the starting offset.length - the number of bytes.
java.lang.OutOfMemoryError - if there is not enough free memory.
public AnsiString(AnsiString value)
throws java.lang.OutOfMemoryError
Constructs a native buffer of size of the native buffer of specified ANSI string bytes in length for ANSI string.
value - the ANSI string to use.
java.lang.OutOfMemoryError - if there is not enough free memory.public AnsiString(Pointer pointer)
Sets the size of the native buffer to -1.
pointer - the pointer to the ANSI string.
public AnsiString(Pointer pointer,
int size)
Sets the native buffer size to the specified size + 1.
pointer - the pointer to the ANSI string.size - the native buffer in bytes.| Method Detail |
|---|
public int length()
public java.lang.String getValue()
public void setValue(java.lang.String value)
throws java.lang.IndexOutOfBoundsException
value - the String to use.
java.lang.IndexOutOfBoundsException - if the length of the specified String is larger than the size of the native buffer of this ANSI string.
public void setValue(byte[] value)
throws java.lang.IndexOutOfBoundsException
value - the array of bytes to use.
java.lang.IndexOutOfBoundsException - if the length of the specified array of bytes is larger than the size of the native buffer of this ANSI string.
public void setValue(byte[] value,
int offset,
int length)
throws java.lang.IndexOutOfBoundsException
value - the array of bytes to use.offset - the starting offset.length - the number of bytes to use.
java.lang.IndexOutOfBoundsException - if the length of the specified array of bytes is larger than the size of the native buffer of this ANSI string.
public void setValue(AnsiString value)
throws java.lang.IndexOutOfBoundsException
value - the ANSI string to use.
java.lang.IndexOutOfBoundsException - if the length of the specified ANSI string is larger than the size of the native buffer of this ANSI string.public void setValue(Pointer pointer)
Sets the size of the native buffer to -1.
pointer - the pointer to an ANSI string.
public void setValue(Pointer pointer,
int size)
Sets the native buffer size to the specified size + 1.
pointer - the pointer to an ANSI string.size - the size in bytes of the referenced ansi string.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class NativeObjectobject - the ANSI string to compare against.
public boolean equalsIgnoreCase(AnsiString string)
string - the ANSI string to compare against.
public int compareTo(java.lang.Object object)
throws java.lang.ClassCastException
object - the ANSI string to compare against.
java.lang.ClassCastException - if the specified object is not an ANSI string.public int compareTo(AnsiString string)
string - the ANSI string to compare against.
public int compareToIgnoreCase(AnsiString string)
string - the ANSI string to compare against.
public java.lang.Object clone()
throws java.lang.OutOfMemoryError
clone in class NativeObjectjava.lang.OutOfMemoryError - if there is not enough free memory.public int hashCode()
hashCode in class NativeObject
|
Servertec Jenie 1.0.1 09/04/2005 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2004-2005 Servertec. All rights reserved.