A B C D E G I L M P R S T V W

A

addMessage(Message) - Method in class comm2j.VectorMessage
Insert a given message at the end of the vector

B

ByteMessage - class comm2j.ByteMessage.
ByteMessage is the message class used to send and receive bytes to/from remote server.
ByteMessage() - Constructor for class comm2j.ByteMessage
Constructor.
ByteMessage(Byte) - Constructor for class comm2j.ByteMessage
Constructor.

C

className - Variable in class comm2j.Message
 
comm2j - package comm2j
 
Comm2J - class comm2j.Comm2J.
Comm2j is a class used to communicate with a Server (J2ME or J2SE), transmitting and receiving Messages.
It uses Read2J to communicate with the Server.
Comm2J(CommandListener, Display, String, String) - Constructor for class comm2j.Comm2J
Constructor.
Save the connection data.
Comm2J(CommandListener, Display, String, String, int) - Constructor for class comm2j.Comm2J
Constructor.
Save the connection data.
compress(InputStream, OutputStream) - Method in class comm2j.LZW2J
Compress data from given InputStream and send the compressed result data to given OutputStream.
COMPRESSED - Static variable in class comm2j.Read2J
Defines a compressed (LZW) communication between peers
connect() - Method in class comm2j.Comm2J
Connect to the remote host.

D

DateMessage - class comm2j.DateMessage.
DateMessage is the message class used to send and receive date to/from remote server.
DateMessage() - Constructor for class comm2j.DateMessage
Constructor.
DateMessage(Date) - Constructor for class comm2j.DateMessage
Constructor.
decompress(InputStream, OutputStream) - Method in class comm2j.LZW2J
Decompress data from given InputStream and send the uncompressed result data to given OutputStream.
disconnect() - Method in class comm2j.Comm2J
Disconnect from the remote host.

E

elements() - Method in class comm2j.VectorMessage
Returns an enumeration of the messages of this vector.

G

getCommandListener() - Method in class comm2j.Comm2J
Returns the CommandListener used by Comm2J
getConnection() - Method in class comm2j.Comm2J
Returns the connection link to the remote host ot null if not yet initialized.
getDisplay() - Method in class comm2j.Comm2J
Returns the display used by Comm2J
getHost() - Method in class comm2j.Comm2J
Returns the host used by Comm2j
getMessage() - Method in class comm2j.Message
Returns the current message
getMessage() - Method in interface comm2j.MessageI
Returns the current message
getMode() - Method in class comm2j.Comm2J
Returns the mode used by Comm2J for the communication with the server
getMode() - Method in class comm2j.Read2J
Returns the mode used by Read2J for the communication
getName() - Method in class comm2j.Message
Returns the name of the message class
getName() - Method in interface comm2j.MessageI
Returns the name of the message class
getPort() - Method in class comm2j.Comm2J
Returns the port used by Comm2j

I

insertMessageAt(Message, int) - Method in class comm2j.VectorMessage
Insert a given message at the given position of the vector, replacing old message
IntegerMessage - class comm2j.IntegerMessage.
IntegerMessage is the message class used to send and receive integer to/from remote server.
IntegerMessage() - Constructor for class comm2j.IntegerMessage
Constructor.
IntegerMessage(Integer) - Constructor for class comm2j.IntegerMessage
Constructor.
isConnected() - Method in class comm2j.Comm2J
Used to know if Comm2J has a valid link to the remote host
isMessageSet() - Method in class comm2j.Message
Used to know if a message was set (by setMessage or writeMessage)
isMessageSet() - Method in interface comm2j.MessageI
Used to know if a message was set (by setMessage or writeMessage)

L

LongMessage - class comm2j.LongMessage.
LongMessage is the message class used to send and receive long to/from remote server.
LongMessage() - Constructor for class comm2j.LongMessage
Constructor.
LongMessage(Long) - Constructor for class comm2j.LongMessage
Constructor.
LZW2J - class comm2j.LZW2J.
LZW2J is a class used to compress/decompress an Input-/OutputStream
LZW2J() - Constructor for class comm2j.LZW2J
Constructor.

M

message - Variable in class comm2j.Message
 
Message - class comm2j.Message.
Message is the basic class used to send and receive message to/from remote server.
It will be derived to manage different type of message.
Do NOT use this class directly!
Message() - Constructor for class comm2j.Message
Constructor.
messageHasBeenSet - Variable in class comm2j.Message
 
MessageI - interface comm2j.MessageI.
MessageI is the basic interface used to send and receive message to/from remote server

P

PACKLENGTH - Static variable in class comm2j.Read2J
Defines the number of bytes used to describe the lenght of the packet

R

RAW - Static variable in class comm2j.Read2J
Defines a normal communication between peers
Read2J - class comm2j.Read2J.
Read2J is a class used to communicate with another peer (J2ME or J2SE), transmitting and receiving Messages throws an opened Socket connection.
Read2J supports compression (LZW), too.
Read2J() - Constructor for class comm2j.Read2J
Constructor.
readHeader(InputStream) - Method in class comm2j.Message
Gets the header identifying the message type from the give InputStream
readHeader(InputStream) - Method in interface comm2j.MessageI
Gets the header identifying the message type from the give InputStream
readLength(InputStream) - Static method in class comm2j.Read2J
Gets the length of the packet from given InputStream.
The length is coded in 3 bytes, so it's possible to use just 7 bits per byte and armor the codes so that LZW can encode/decode them.
readMessage(InputStream) - Method in class comm2j.Message
Reads a message from give InputStream.
readMessage(InputStream) - Method in class comm2j.VectorMessage
Reads a message from give InputStream.
readMessage(InputStream) - Method in interface comm2j.MessageI
Reads a message from give InputStream.
readMessageFromStream() - Method in class comm2j.Comm2J
Receive a message from the remote host.
readMessageFromStream(InputStream) - Method in class comm2j.Read2J
Receive a message from the remote peer.
It automatically recognises if the communication was compressed or not.

S

setCommandListener(CommandListener) - Method in class comm2j.Comm2J
Sets the CommandListener used by Comm2J
setDisplay(Display) - Method in class comm2j.Comm2J
Sets the display to be used by Comm2J
setHost(String) - Method in class comm2j.Comm2J
Sets the host used by Comm2j
setInternalObject(Object) - Method in class comm2j.Message
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.VectorMessage
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.StringMessage
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.DateMessage
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.LongMessage
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.ShortMessage
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.ByteMessage
Sets the internal object.
setInternalObject(Object) - Method in class comm2j.IntegerMessage
Sets the internal object.
setMessage(Object) - Method in class comm2j.Message
Sets the message
setMessage(Object) - Method in interface comm2j.MessageI
Sets the message
setMode(int) - Method in class comm2j.Comm2J
Sets the mode used by Comm2J for the communication with the server
setMode(int) - Method in class comm2j.Read2J
Sets the mode used by Read2J for the communication
setPort(String) - Method in class comm2j.Comm2J
Sets the port used by Comm2j
ShortMessage - class comm2j.ShortMessage.
ShortMessage is the message class used to send and receive short to/from remote server.
ShortMessage() - Constructor for class comm2j.ShortMessage
Constructor.
ShortMessage(Short) - Constructor for class comm2j.ShortMessage
Constructor.
size() - Method in class comm2j.VectorMessage
Returns the number of messages in this vector
StringMessage - class comm2j.StringMessage.
StringMessage is the message class used to send and receive strings to/from remote server.
StringMessage() - Constructor for class comm2j.StringMessage
Constructor.
StringMessage(String) - Constructor for class comm2j.StringMessage
Constructor.

T

toString() - Method in class comm2j.Message
Returns a string with the content of the message
toString() - Method in interface comm2j.MessageI
Returns a string with the content of the message

V

VectorMessage - class comm2j.VectorMessage.
VectorMessage is the message class used to send and receive vector of messages to/from remote server.
VectorMessage() - Constructor for class comm2j.VectorMessage
Constructor.
VectorMessage(Vector) - Constructor for class comm2j.VectorMessage
Constructor.

W

writeHeader(OutputStream) - Method in class comm2j.Message
Send an header identifying the message type throw the give OutputStream
writeHeader(OutputStream) - Method in interface comm2j.MessageI
Send an header identifying the message type throw the give OutputStream
writeLength(OutputStream, int) - Static method in class comm2j.Read2J
Sends the length of the packet throws given OutputStream.
The length will be coded in 3 bytes, so it's possible to use just 7 bits per byte and armor the codes so that LZW can encode/decode them.
writeMessage(OutputStream) - Method in class comm2j.Message
Send current message throw given OutputStream
writeMessage(OutputStream) - Method in class comm2j.VectorMessage
Send current message throw given OutputStream
writeMessage(OutputStream) - Method in class comm2j.DateMessage
Send current message throw given OutputStream
writeMessage(OutputStream) - Method in interface comm2j.MessageI
Send current message throw given OutputStream
writeMessageToStream(Message) - Method in class comm2j.Comm2J
Send a message to the remote host.
writeMessageToStream(Message, OutputStream) - Method in class comm2j.Read2J
Sends a message to the remote peer.
If compression mode was set, the stream will be compressed.

A B C D E G I L M P R S T V W