public class SessionId extends Object
| Constructor and Description |
|---|
SessionId()Creates a new SessionId with default value -1. |
SessionId(int id)0-65535. |
| Modifier and Type | Method and Description |
|---|---|
boolean | equals(Object obj)Compares this session ID with another object for equality. |
int | getSessionId()Session id. |
int | hashCode()Hash code derived from the session ID value. |
void | readBytes(InputStream in)Read the session ID from a stream. |
void | setSessionId(int id)Set the session ID. |
String | toString()Returns a string representation of this session ID. |
void | writeBytes(OutputStream out)Writes the session ID to a stream. |
public SessionId()
public SessionId(int id)
id - 0-65535public boolean equals(Object obj)
public int getSessionId()
public int hashCode()
public void readBytes(InputStream in) throws DataFormatException, IOException
IllegalStateException - if already setDataFormatExceptionIOExceptionpublic void setSessionId(int id)
id - 0-65535IllegalArgumentException - if the ID is out of rangeIllegalStateException - if already setpublic String toString()
public void writeBytes(OutputStream out) throws DataFormatException, IOException