com.web_visage.ichat
Class DefaultByteConverter

java.lang.Object
  extended by com.web_visage.ichat.DefaultByteConverter
All Implemented Interfaces:
ByteConverter, IChatMessageConstants

public class DefaultByteConverter
extends java.lang.Object
implements ByteConverter, IChatMessageConstants

Default binary message converter;

Author:
K.Baturytski

Field Summary
 
Fields inherited from interface com.web_visage.ichat.IChatMessageConstants
BEGIN_END_MARKER, COMMON_LINE, ICHAT_TAG, PRIVATE_TAG, SEPARATOR, WILDCARD
 
Constructor Summary
DefaultByteConverter()
          Constructor.
DefaultByteConverter(byte[] signatureBytes, byte[] messageSep, byte[] paramSep)
          Constructor.
 
Method Summary
 byte[] convert(IChatMessage message)
          Converts message to binary form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultByteConverter

public DefaultByteConverter()
Constructor.


DefaultByteConverter

public DefaultByteConverter(byte[] signatureBytes,
                            byte[] messageSep,
                            byte[] paramSep)
Constructor. Allows slight protocol variations.

Parameters:
signatureBytes -
messageSep -
paramSep -
Method Detail

convert

public byte[] convert(IChatMessage message)
Description copied from interface: ByteConverter
Converts message to binary form.

Specified by:
convert in interface ByteConverter
Parameters:
message - - message to convert
Returns:
binary converted message
See Also:
ByteConverter.convert(com.web_visage.ichat.IChatMessage)