Package org.cybergarage.http
Class HTTPStatus
java.lang.Object
org.cybergarage.http.HTTPStatus
public class HTTPStatus extends Object
-
Field Summary
Fields Modifier and Type Field Description static int
BAD_REQUEST
static int
CONTINUE
static int
INTERNAL_SERVER_ERROR
static int
INVALID_RANGE
static int
NOT_FOUND
static int
OK
static int
PARTIAL_CONTENT
static int
PRECONDITION_FAILED
-
Constructor Summary
Constructors Constructor Description HTTPStatus()
HTTPStatus(String lineStr)
HTTPStatus(String ver, int code, String reason)
-
Method Summary
Modifier and Type Method Description static String
code2String(int code)
String
getReasonPhrase()
int
getStatusCode()
String
getVersion()
boolean
isSuccessful()
static boolean
isSuccessful(int statCode)
void
set(String lineStr)
void
setReasonPhrase(String value)
void
setStatusCode(int value)
void
setVersion(String value)
-
Field Details
-
CONTINUE
public static final int CONTINUE- See Also:
- Constant Field Values
-
OK
public static final int OK- See Also:
- Constant Field Values
-
PARTIAL_CONTENT
public static final int PARTIAL_CONTENT- See Also:
- Constant Field Values
-
BAD_REQUEST
public static final int BAD_REQUEST- See Also:
- Constant Field Values
-
NOT_FOUND
public static final int NOT_FOUND- See Also:
- Constant Field Values
-
PRECONDITION_FAILED
public static final int PRECONDITION_FAILED- See Also:
- Constant Field Values
-
INVALID_RANGE
public static final int INVALID_RANGE- See Also:
- Constant Field Values
-
INTERNAL_SERVER_ERROR
public static final int INTERNAL_SERVER_ERROR- See Also:
- Constant Field Values
-
-
Constructor Details
-
HTTPStatus
public HTTPStatus() -
HTTPStatus
-
HTTPStatus
-
-
Method Details
-
code2String
-
setVersion
-
setStatusCode
public void setStatusCode(int value) -
setReasonPhrase
-
getVersion
-
getStatusCode
public int getStatusCode() -
getReasonPhrase
-
isSuccessful
public static final boolean isSuccessful(int statCode) -
isSuccessful
public boolean isSuccessful() -
set
-