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.
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!
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.
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.
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.