public static enum StatusLine.StatusClass extends Enum<StatusLine.StatusClass>
OTHER for non-standard codes.HttpStatus| Enum Constant and Description | 
|---|
| CLIENT_ERRORClient Error  4xxHTTP status codes. | 
| INFORMATIONALInformational  1xxHTTP status codes. | 
| OTHERAny other HTTP status codes (e.g. | 
| REDIRECTIONRedirection  3xxHTTP status codes. | 
| SERVER_ERROR5xxHTTP status codes. | 
| SUCCESSFULSuccessful  2xxHTTP status codes. | 
| Modifier and Type | Method and Description | 
|---|---|
| static StatusLine.StatusClass | from(int statusCode)Gets the response status class for the given status code. | 
| static StatusLine.StatusClass | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static StatusLine.StatusClass[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final StatusLine.StatusClass INFORMATIONAL
1xx HTTP status codes.public static final StatusLine.StatusClass SUCCESSFUL
2xx HTTP status codes.public static final StatusLine.StatusClass REDIRECTION
3xx HTTP status codes.public static final StatusLine.StatusClass CLIENT_ERROR
4xx HTTP status codes.public static final StatusLine.StatusClass SERVER_ERROR
5xx HTTP status codes.public static final StatusLine.StatusClass OTHER
public static StatusLine.StatusClass[] values()
for (StatusLine.StatusClass c : StatusLine.StatusClass.values()) System.out.println(c);
public static StatusLine.StatusClass valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static StatusLine.StatusClass from(int statusCode)
statusCode - response status code to get the class for.HttpStatusCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.