net.codescore.gserver
Class Message

java.lang.Object
  extended by net.codescore.gserver.Message

public class Message
extends Object


Field Summary
static int HEADER_LEN
           
static int MESSAGE_LENGTH
           
private  byte[] p
           
static int VERSION
           
 
Constructor Summary
Message(byte[] payload)
           
Message(String payload)
           
 
Method Summary
 byte[] getFullMessage()
           
 byte[] getMessage()
           
private static byte[] makeHeader(byte[] payload)
           
private static byte[] pad(byte[] payload)
           
private static byte[] padHeader(String s)
           
static int readHeader(byte[] incomming)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADER_LEN

public static final int HEADER_LEN
See Also:
Constant Field Values

MESSAGE_LENGTH

public static final int MESSAGE_LENGTH
See Also:
Constant Field Values

VERSION

public static final int VERSION
See Also:
Constant Field Values

p

private final byte[] p
Constructor Detail

Message

public Message(byte[] payload)

Message

public Message(String payload)
Method Detail

readHeader

public static int readHeader(byte[] incomming)

makeHeader

private static byte[] makeHeader(byte[] payload)

pad

private static byte[] pad(byte[] payload)

padHeader

private static byte[] padHeader(String s)

getFullMessage

public byte[] getFullMessage()

getMessage

public byte[] getMessage()

toString

public String toString()
Overrides:
toString in class Object


Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.