comm2j
Class DateMessage

java.lang.Object
  |
  +--comm2j.Message
        |
        +--comm2j.DateMessage
All Implemented Interfaces:
MessageI

public class DateMessage
extends Message

DateMessage is the message class used to send and receive date to/from remote server.

Version:
1.0
Author:
Luca Bertoncello <lucabert@lucabert.de>
See Also:
Comm2J, Date

Fields inherited from class comm2j.Message
className, message, messageHasBeenSet
 
Constructor Summary
DateMessage()
          Constructor.
DateMessage(java.util.Date message)
          Constructor.
 
Method Summary
protected  void setInternalObject(java.lang.Object obj)
          Sets the internal object.
 int writeMessage(java.io.OutputStream os)
          Send current message throw given OutputStream
 
Methods inherited from class comm2j.Message
getMessage, getName, isMessageSet, readHeader, readMessage, setMessage, toString, writeHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateMessage

public DateMessage()
Constructor. Initialize the class with null date

DateMessage

public DateMessage(java.util.Date message)
Constructor. Initialize the class with given date
Parameters:
message - Initial date
Method Detail

writeMessage

public int writeMessage(java.io.OutputStream os)
                 throws java.io.IOException
Send current message throw given OutputStream
Overrides:
writeMessage in class Message
Parameters:
os - The OutputStream used to read data
Returns:
Number of wrote bytes
Throws:
java.io.IOException - if an error occoured

setInternalObject

protected void setInternalObject(java.lang.Object obj)
Sets the internal object. This function is used by readMessage.
Overrides:
setInternalObject in class Message
Parameters:
obj - Internal object to be set