gecco.communication.messages
Class MapMessage

java.lang.Object
  |
  +--gecco.communication.messages.Message
        |
        +--gecco.communication.messages.MapMessage

public class MapMessage
extends Message

This message contains the map and the icons.

Author:
Karl Hasselström

Field Summary
 Map icons
           
 byte[] mapRGB
           
 Dimension size
           
 
Constructor Summary
MapMessage(Dimension size, byte[] mapRGB, Map icons)
           
 
Method Summary
static Message read(DataInput in)
          This factory method reads a message of this type without an initial ID from the input stream, and returns a Message object.
 void write(DataOutput out)
          This method writes the message to the given DataOutput.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

public Dimension size

mapRGB

public byte[] mapRGB

icons

public Map icons
Constructor Detail

MapMessage

public MapMessage(Dimension size,
                  byte[] mapRGB,
                  Map icons)
Method Detail

write

public void write(DataOutput out)
           throws IOException
This method writes the message to the given DataOutput.
Overrides:
write in class Message
Parameters:
out - The output stream.
Throws:
IOException - In case something goes wrong.

read

public static Message read(DataInput in)
                    throws IOException
This factory method reads a message of this type without an initial ID from the input stream, and returns a Message object.
Parameters:
in - The input stream.
Returns:
An instance of Message.