All Implemented Interfaces:
Serializable, DataStructure

public class AbuseReasonextends DataStructureImpl
Defines the structure for why abuse was reported either by the client to the router or by the router to the client.
See Also:
  • Field Details

    • _reason

      private String _reason
      Text description of the abuse reason.
  • Constructor Details

    • AbuseReason

      public AbuseReason()
      Create a new abuse reason.
  • Method Details

    • getReason

      public String getReason()
      Abuse reason text.
      Returns:
      the abuse reason
    • setReason

      public void setReason(String reason)
      New abuse reason text.
      Parameters:
      reason - the abuse reason
    • readBytes

      public void readBytes(InputStream in) throws DataFormatException, IOException
      Reads the abuse reason from a stream.
      Parameters:
      in - stream to read from
      Throws:
      DataFormatException - if the data is improperly formatted
      IOException - if there was a problem reading the stream
    • writeBytes

      public void writeBytes(OutputStream out) throws DataFormatException, IOException
      Writes the abuse reason to a stream.
      Parameters:
      out - stream to write to
      Throws:
      DataFormatException - if the data was incomplete or not yet ready to be written
      IOException - if there was a problem writing to the stream
    • equals

      public boolean equals(Object object)
      Compares this abuse reason with another object for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Hash code derived from the reason string.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Returns a string representation of this abuse reason.
      Overrides:
      toString in class Object