package test.rate;

import jist.swans.misc.Message;

//class TestMessage
public class TestMessage implements Message {

  int id = 0;
  int size = 0;
  String msgStr = null;
  
  public void getBytes(byte[] msg, int offset) {
    if (null != msgStr)
      System.arraycopy(msgStr.getBytes(), offset, msg, 0,
          msgStr.getBytes().length - offset);
  }

  public int getSize() {
    return size;
  }
 
  public String toString() {
    return msgStr;
  }
  
  public TestMessage(int id, String str) {
    this.id = id;
    this.msgStr = str;
    this.size = msgStr.getBytes().length;
  }
}

