Class HttpReplyHdr
-
- All Implemented Interfaces:
public final class HttpReplyHdr
Utility class to generate HTTP responses of various types.
-
-
Method Summary
Modifier and Type Method Description static String
formOk(String contentType, long contentLength)
Forms a http ok reply header static String
formCreated()
Indicates a new file was created. static String
formAccepted()
Indicates the document was accepted. static String
formPartial()
Indicates only a partial response was sent. static String
formMoved()
Indicates a requested URL has moved to a new address or name. static String
formFound()
Never seen this used. static String
formMethod()
The requested method is not implemented by the server. static String
formNotModified()
Indicates remote copy of the requested object is current. static String
formUnauthorized()
Client not authorized for the request. static String
formPaymentNeeded()
Payment is required for service. static String
formForbidden()
Client if forbidden to get the request service. static String
formNotFound()
The requested object was not found. static String
formInternalError()
The server had a problem and could not fulfill the request. static String
formNotImplemented()
Server does not do the requested feature. static String
formNotImplemented(String reason)
Server does not do the requested feature. static String
formOverloaded()
Server is overloaded, client should try again latter. static String
formTimeout()
Indicates the request took to long. static String
formServerNotFound()
Indicates the client's proxies could not locate a server. static String
formNotAllowed()
Indicates the client is not allowed to access the object. -
-
Method Detail
-
formOk
static String formOk(String contentType, long contentLength)
Forms a http ok reply header
- Parameters:
contentType
- the mime-type of the contentcontentLength
- the length of the content
-
formCreated
static String formCreated()
Indicates a new file was created.
-
formAccepted
static String formAccepted()
Indicates the document was accepted.
-
formPartial
static String formPartial()
Indicates only a partial response was sent.
-
formMethod
static String formMethod()
The requested method is not implemented by the server.
-
formNotModified
static String formNotModified()
Indicates remote copy of the requested object is current.
-
formUnauthorized
static String formUnauthorized()
Client not authorized for the request.
-
formPaymentNeeded
static String formPaymentNeeded()
Payment is required for service.
-
formForbidden
static String formForbidden()
Client if forbidden to get the request service.
-
formNotFound
static String formNotFound()
The requested object was not found.
-
formInternalError
static String formInternalError()
The server had a problem and could not fulfill the request.
-
formNotImplemented
static String formNotImplemented()
Server does not do the requested feature.
-
formNotImplemented
static String formNotImplemented(String reason)
Server does not do the requested feature.
- Parameters:
reason
- detailed information for causing the failure
-
formOverloaded
static String formOverloaded()
Server is overloaded, client should try again latter.
-
formTimeout
static String formTimeout()
Indicates the request took to long.
-
formServerNotFound
static String formServerNotFound()
Indicates the client's proxies could not locate a server.
-
formNotAllowed
static String formNotAllowed()
Indicates the client is not allowed to access the object.
-
-
-
-