Esempio n. 1
0
  /**
   * Returns a string containing a concise, human-readable description of the receiver.
   *
   * @return a string representation of the event
   */
  public String toString() {
    StringBuffer buffer = new StringBuffer();
    buffer.append("{");
    buffer.append("\n\tLength: ");
    buffer.append(getLength());
    buffer.append("\n\tType: ");
    byte[] type = getTypeBytes();
    for (int i = 0; i < type.length; i++) {
      buffer.append((char) type[i]);
    }

    contributeToString(buffer);

    buffer.append("\n\tCRC: ");
    buffer.append(Integer.toHexString(getCRC()));
    buffer.append("\n}");
    return buffer.toString();
  }