Class HttpException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.hc.core5.http.HttpException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HPackException, ProtocolException

public class HttpException extends Exception
Signals that an HTTP exception has occurred.
Since:
4.0
See Also:
  • Field Details

  • Constructor Details

    • HttpException

      public HttpException()
      Creates a new HttpException with a null detail message.
    • HttpException

      public HttpException(String message)
      Creates a new HttpException with the specified detail message.
      Parameters:
      message - the exception detail message
    • HttpException

      public HttpException(String format, Object... args)
      Constructs a new HttpException with the specified detail message.
      Parameters:
      format - The exception detail message format; see String.format(String, Object...).
      args - The exception detail message arguments; see String.format(String, Object...).
      Since:
      5.0
    • HttpException

      public HttpException(String message, Throwable cause)
      Creates a new HttpException with the specified detail message and cause.
      Parameters:
      message - the exception detail message
      cause - the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable
  • Method Details

    • clean

      static String clean(String message)
      Cleans the given String by converting characters with values less than 32 to equivalent hexadecimal codes.
      Parameters:
      message - the source string.
      Returns:
      a converted string.