|
Copyright © Rasmus Sten and contributors, 1997-2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nu.dll.lyskom.KomToken
A KomToken represents an object to be sent to or has been received from the server. It is generally a serie of bytes.
Field Summary | |
static int |
ARRAY
An array of KomToken objects |
static int |
COMPL
A "complex" LysKOM token. |
static int |
HOLLERITH
A Hollerith |
static int |
PRIMITIVE
A "primitive" LysKOM token, such as INT32 |
Constructor Summary | |
KomToken()
Creates an empty KomToken object. |
|
KomToken(byte[] b)
Constructs a simple KomToken object containing the supplied bytes. |
|
KomToken(int i)
Constructs a simple KomToken object representing the supplied integer value. |
|
KomToken(java.lang.String s)
Converts the supplied string into bytes according to the default encoding, using the result as the contents for this KomToken |
Method Summary | |
boolean |
equals(java.lang.Object o)
Returns true if the supplied object is of type KomToken, and it's contents are equal to this, or if it is a String which, converted to the default charset, equals this object's contents, or if it is an Integer, which, when converted to a Protocol A representation of its value, is equal to this object's contents. |
byte[] |
getContents()
Returns the contents of this KomToken |
int |
getType()
Returns the type of this KomToken |
int |
intValue()
Attempts to parse the contents of this KomToken into an integer value using a radix of 10. |
boolean |
isEol()
Returns true if this KomToken is the last token in a command received from the server. |
void |
setContents(byte[] c)
Sets the contents of this KomToken |
int |
toInt()
Deprecated. use intValue() instead |
int |
toInteger()
Deprecated. use intValue() to get an int, this method will be changed to return Integer |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PRIMITIVE
public static final int COMPL
public static final int ARRAY
public static final int HOLLERITH
Constructor Detail |
public KomToken()
public KomToken(int i)
public KomToken(byte[] b)
public KomToken(java.lang.String s)
Method Detail |
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean isEol()
public int toInteger()
public int intValue()
public int toInt()
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] getContents()
public void setContents(byte[] c)
public int getType()
|
Copyright © Rasmus Sten and contributors, 1997-2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |