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
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
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
-
-
Method Detail
-
code2String
public static final String code2String(int code)
-
setVersion
public void setVersion(String value)
-
setStatusCode
public void setStatusCode(int value)
-
setReasonPhrase
public void setReasonPhrase(String value)
-
getVersion
public String getVersion()
-
getStatusCode
public int getStatusCode()
-
getReasonPhrase
public String getReasonPhrase()
-
isSuccessful
public static final boolean isSuccessful(int statCode)
-
isSuccessful
public boolean isSuccessful()
-
set
public void set(String lineStr)
-
-