java.lang.Object
com.github.jh3nd3rs0n.jargyle.protocolbase.socks5.userpassauthmethod.Response

public final class Response extends Object
A response from the server.
  • Field Details

    • STATUS_SUCCESS_BYTE_VALUE

      public static final byte STATUS_SUCCESS_BYTE_VALUE
      The status byte value that indicates success.
      See Also:
    • STATUS_SUCCESS

      public static final UnsignedByte STATUS_SUCCESS
      The status UnsignedByte that indicates success.
  • Method Details

    • newInstance

      public static Response newInstance(UnsignedByte stat)
      Returns a new Response with the provided status UnsignedByte.
      Parameters:
      stat - the provided status UnsignedByte
      Returns:
      a new Response with the provided status UnsignedByte
    • newInstanceFrom

      public static Response newInstanceFrom(InputStream in) throws IOException
      Returns a new Response from the provided InputStream. An EOFException is thrown if the end of the provided InputStream is reached.
      Parameters:
      in - the provided InputStream
      Returns:
      a new Response
      Throws:
      IOException - if the end of the provided InputStream is reached (EOFException) or if an I/O error occurs
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getStatus

      public UnsignedByte getStatus()
      Returns the status UnsignedByte of this Response.
      Returns:
      the status UnsignedByte of this Response
    • getVersion

      public Version getVersion()
      Returns the Version of this Response.
      Returns:
      the Version of this Response
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toByteArray

      public byte[] toByteArray()
      Returns the byte array of this Response.
      Returns:
      the byte array of this Response
    • toString

      public String toString()
      Returns the String representation of this Response.
      Overrides:
      toString in class Object
      Returns:
      the String representation of this Response