Enum HttpStatusCodes

    • Method Detail

      • values

        public static HttpStatusCodes[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (HttpStatusCodes c : HttpStatusCodes.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HttpStatusCodes valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromStatusCode

        public static HttpStatusCodes fromStatusCode​(int statusCode)
        Convert a numerical status code into the corresponding status enum object.
        Parameters:
        statusCode - the numerical status code
        Returns:
        the matching status enum object or null if no matching enum is defined
      • getStatusCode

        public int getStatusCode()
        Get the associated status code.
        Returns:
        the status code.
      • getInfo

        public String getInfo()
        Get the status code info.
        Returns:
        the status code info