Class BasicClassicHttpResponse

    • Constructor Detail

      • BasicClassicHttpResponse

        public BasicClassicHttpResponse​(int code,
                                        ReasonPhraseCatalog catalog,
                                        java.util.Locale locale)
        Creates a new response.
        Parameters:
        code - the status code
        catalog - the reason phrase catalog, or null to disable automatic reason phrase lookup
        locale - the locale for looking up reason phrases, or null for the system locale
      • BasicClassicHttpResponse

        public BasicClassicHttpResponse​(int code,
                                        java.lang.String reasonPhrase)
        Creates a new response.
        Parameters:
        code - the status code of the response
        reasonPhrase - the reason phrase to the status code, or null
      • BasicClassicHttpResponse

        public BasicClassicHttpResponse​(int code)
        Creates a new response.
        Parameters:
        code - the status code of the response
    • Method Detail

      • setEntity

        public void setEntity​(HttpEntity entity)
        Description copied from interface: HttpEntityContainer
        Sets an entity for this message.

        Please note that if an entity has already been set it is responsibility of the caller to ensure release of the resources that may be associated with that entity.

        Specified by:
        setEntity in interface HttpEntityContainer
        Parameters:
        entity - the entity to set of this message, or null to unset
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException