Class HttpException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    HPackException, ProtocolException

    public class HttpException
    extends java.lang.Exception
    Signals that an HTTP exception has occurred.
    Since:
    4.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpException()
      Creates a new HttpException with a null detail message.
      HttpException​(java.lang.String message)
      Creates a new HttpException with the specified detail message.
      HttpException​(java.lang.String format, java.lang.Object... args)
      Constructs a new HttpException with the specified detail message.
      HttpException​(java.lang.String message, java.lang.Throwable cause)
      Creates a new HttpException with the specified detail message and cause.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String clean​(java.lang.String message)
      Cleans the given String by converting characters with values less than 32 to equivalent hexadecimal codes.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HttpException

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

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

        public HttpException​(java.lang.String format,
                             java.lang.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​(java.lang.String message,
                             java.lang.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 Detail

      • clean

        static java.lang.String clean​(java.lang.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.