Class ParseHttpResponse


  • public final class ParseHttpResponse
    extends java.lang.Object
    The http response we receive from parse server. Instances of this class are not immutable. The response body may be consumed only once. The other fields are immutable.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ParseHttpResponse.Builder
      Builder for ParseHttpResponse.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getAllHeaders()
      Gets all headers from this ParseHttpResponse.
      java.io.InputStream getContent()
      Returns the content of the ParseHttpResponse's body.
      java.lang.String getContentType()
      Gets the Content-Type of this ParseHttpResponse.
      java.lang.String getHeader​(java.lang.String name)
      Retrieves the header value from this ParseHttpResponse by the given header name.
      java.lang.String getReasonPhrase()
      Gets the reason phrase of this ParseHttpResponse.
      int getStatusCode()
      Gets the status code of this ParseHttpResponse.
      long getTotalSize()
      Returns the size of the ParseHttpResponse's body.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Gets the status code of this ParseHttpResponse.
        Returns:
        The status code of this ParseHttpResponse.
      • getContent

        public java.io.InputStream getContent()
        Returns the content of the ParseHttpResponse's body. The content can only be read once and can't be reset.
        Returns:
        The content of the ParseHttpResponse's body.
      • getTotalSize

        public long getTotalSize()
        Returns the size of the ParseHttpResponse's body. -1 if the size of the ParseHttpResponse's body is unknown.
        Returns:
        The size of the ParseHttpResponse's body.
      • getReasonPhrase

        public java.lang.String getReasonPhrase()
        Gets the reason phrase of this ParseHttpResponse.
        Returns:
        The reason phrase of this ParseHttpResponse.
      • getContentType

        public java.lang.String getContentType()
        Gets the Content-Type of this ParseHttpResponse.
        Returns:
        The Content-Type of this ParseHttpResponse.
      • getHeader

        public java.lang.String getHeader​(java.lang.String name)
        Retrieves the header value from this ParseHttpResponse by the given header name.
        Parameters:
        name - The name of the header.
        Returns:
        The value of the header.
      • getAllHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getAllHeaders()
        Gets all headers from this ParseHttpResponse.
        Returns:
        The headers of this ParseHttpResponse.