Class WebDavResponse

  • All Implemented Interfaces:
    Response

    public class WebDavResponse
    extends Object
    implements Response
    Customized Response which add support for getting the response's body as an XML document (@link WebDavResponse#getBodyAsXML}
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Description copied from interface: Response
        Returns the status code for the request.
        Specified by:
        getStatusCode in interface Response
        Returns:
        The status code
      • getStatusText

        public String getStatusText()
        Description copied from interface: Response
        Returns the status text for the request.
        Specified by:
        getStatusText in interface Response
        Returns:
        The status text
      • getResponseBodyAsBytes

        public byte[] getResponseBodyAsBytes()
        Description copied from interface: Response
        Return the entire response body as a byte[].
        Specified by:
        getResponseBodyAsBytes in interface Response
        Returns:
        the entire response body as a byte[].
      • getResponseBodyAsByteBuffer

        public ByteBuffer getResponseBodyAsByteBuffer()
        Description copied from interface: Response
        Return the entire response body as a ByteBuffer.
        Specified by:
        getResponseBodyAsByteBuffer in interface Response
        Returns:
        the entire response body as a ByteBuffer.
      • getResponseBodyAsStream

        public InputStream getResponseBodyAsStream()
        Description copied from interface: Response
        Returns an input stream for the response body. Note that you should not try to get this more than once, and that you should not close the stream.
        Specified by:
        getResponseBodyAsStream in interface Response
        Returns:
        The input stream
      • getResponseBody

        public String getResponseBody()
        Description copied from interface: Response
        Return the entire response body as a String.
        Specified by:
        getResponseBody in interface Response
        Returns:
        the entire response body as a String.
      • getResponseBody

        public String getResponseBody​(Charset charset)
        Description copied from interface: Response
        Return the entire response body as a String.
        Specified by:
        getResponseBody in interface Response
        Parameters:
        charset - the charset to use when decoding the stream
        Returns:
        the entire response body as a String.
      • getUri

        public Uri getUri()
        Description copied from interface: Response
        Return the request Uri. Note that if the request got redirected, the value of the Uri will be the last valid redirect url.
        Specified by:
        getUri in interface Response
        Returns:
        the request Uri.
      • getContentType

        public String getContentType()
        Description copied from interface: Response
        Return the content-type header value.
        Specified by:
        getContentType in interface Response
        Returns:
        the content-type header value.
      • getHeader

        public String getHeader​(CharSequence name)
        Specified by:
        getHeader in interface Response
        Parameters:
        name - the header name
        Returns:
        the first response header value
      • getHeaders

        public List<String> getHeaders​(CharSequence name)
        Description copied from interface: Response
        Return a List of the response header value.
        Specified by:
        getHeaders in interface Response
        Parameters:
        name - the header name
        Returns:
        the response header value
      • getHeaders

        public io.netty.handler.codec.http.HttpHeaders getHeaders()
        Specified by:
        getHeaders in interface Response
      • isRedirected

        public boolean isRedirected()
        Description copied from interface: Response
        Return true if the response redirects to another object.
        Specified by:
        isRedirected in interface Response
        Returns:
        True if the response redirects to another object.
      • getCookies

        public List<io.netty.handler.codec.http.cookie.Cookie> getCookies()
        Specified by:
        getCookies in interface Response
        Returns:
        the list of Cookie.
      • hasResponseStatus

        public boolean hasResponseStatus()
        Description copied from interface: Response
        Return true if the response's status has been computed by an AsyncHandler
        Specified by:
        hasResponseStatus in interface Response
        Returns:
        true if the response's status has been computed by an AsyncHandler
      • getRemoteAddress

        public SocketAddress getRemoteAddress()
        Description copied from interface: Response
        Get the remote address that the client initiated the request to.
        Specified by:
        getRemoteAddress in interface Response
        Returns:
        The remote address that the client initiated the request to. May be null if asynchronous provider is unable to provide the remote address
      • getLocalAddress

        public SocketAddress getLocalAddress()
        Description copied from interface: Response
        Get the local address that the client initiated the request from.
        Specified by:
        getLocalAddress in interface Response
        Returns:
        The local address that the client initiated the request from. May be null if asynchronous provider is unable to provide the local address
      • getBodyAsXML

        public Document getBodyAsXML()