Class HttpReplyHdr

  • All Implemented Interfaces:

    
    public final class HttpReplyHdr
    
                        

    Utility class to generate HTTP responses of various types.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • formOk

         static String formOk(String contentType, long contentLength)

        Forms a http ok reply header

        Parameters:
        contentType - the mime-type of the content
        contentLength - the length of the content
        Returns:

        a string with the header in it

      • formCreated

         static String formCreated()

        Indicates a new file was created.

        Returns:

        The header in a string;

      • formAccepted

         static String formAccepted()

        Indicates the document was accepted.

        Returns:

        The header in a string;

      • formPartial

         static String formPartial()

        Indicates only a partial response was sent.

        Returns:

        The header in a string;

      • formMoved

         static String formMoved()

        Indicates a requested URL has moved to a new address or name.

        Returns:

        The header in a string;

      • formFound

         static String formFound()

        Never seen this used.

        Returns:

        The header in a string;

      • formMethod

         static String formMethod()

        The requested method is not implemented by the server.

        Returns:

        The header in a string;

      • formNotModified

         static String formNotModified()

        Indicates remote copy of the requested object is current.

        Returns:

        The header in a string;

      • formUnauthorized

         static String formUnauthorized()

        Client not authorized for the request.

        Returns:

        The header in a string;

      • formPaymentNeeded

         static String formPaymentNeeded()

        Payment is required for service.

        Returns:

        The header in a string;

      • formForbidden

         static String formForbidden()

        Client if forbidden to get the request service.

        Returns:

        The header in a string;

      • formNotFound

         static String formNotFound()

        The requested object was not found.

        Returns:

        The header in a string;

      • formInternalError

         static String formInternalError()

        The server had a problem and could not fulfill the request.

        Returns:

        The header in a string;

      • formNotImplemented

         static String formNotImplemented()

        Server does not do the requested feature.

        Returns:

        The header in a string;

      • formNotImplemented

         static String formNotImplemented(String reason)

        Server does not do the requested feature.

        Parameters:
        reason - detailed information for causing the failure
        Returns:

        The header in a string;

      • formOverloaded

         static String formOverloaded()

        Server is overloaded, client should try again latter.

        Returns:

        The header in a string;

      • formTimeout

         static String formTimeout()

        Indicates the request took to long.

        Returns:

        The header in a string;

      • formServerNotFound

         static String formServerNotFound()

        Indicates the client's proxies could not locate a server.

        Returns:

        The header in a string;

      • formNotAllowed

         static String formNotAllowed()

        Indicates the client is not allowed to access the object.

        Returns:

        The header in a string;