org.weborganic.berlioz.http
Class HttpStatusCodes

java.lang.Object
  extended by org.weborganic.berlioz.http.HttpStatusCodes

public final class HttpStatusCodes
extends Object

A utility class for HTTP Status codes.

Since:
Berlioz 0.8.3
Version:
Berlioz 0.8.3 - 1 July 2011
Author:
Christophe Lauret
See Also:
HTTP/1.1 - 10 Status Code Definitions

Method Summary
static String getClassOfStatus(int code)
          Returns the class of the HTTP status code based on the class defined in the RFC.
static String getTitle(int code)
          Returns the title for the specified code based on the name defined in the RFC.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTitle

public static String getTitle(int code)
Returns the title for the specified code based on the name defined in the RFC.

Parameters:
code - the HTTP status code.
Returns:
the corresponding title as defined in RFC 2616 or null if the code does not exist.
See Also:
HTTP/1.1 - 10 Status Code Definitions

getClassOfStatus

public static String getClassOfStatus(int code)
Returns the class of the HTTP status code based on the class defined in the RFC.

Will return for range:

Parameters:
code - the HTTP status code.
Returns:
the class of the HTTP status code based on the class defined in the RFC; or null if code is out of range (less than 100 or greater than 599)
See Also:
HTTP/1.1 - 10 Status Code Definitions