Package marauroa.common.net
Class Encoder
java.lang.Object
marauroa.common.net.Encoder
This class encodes a Message as a stream of bytes.
Encoder follows singleton pattern.
- Author:
- miguel
-
Method Summary
-
Method Details
-
get
Returns an unique instance of encoder- Returns:
- an unique instance of encoder
-
encode
This method uses the Marauroa protocol to encode a Message as a stream of bytes.- Parameters:
msg
- The message to encode- Returns:
- a byte array
- Throws:
IOException
- if there is any error encoding the message.
-