Package com.parse.http
Class ParseHttpResponse
- java.lang.Object
-
- com.parse.http.ParseHttpResponse
-
public final class ParseHttpResponse extends java.lang.ObjectThe 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 classParseHttpResponse.BuilderBuilder forParseHttpResponse.
-
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 thisParseHttpResponse.java.io.InputStreamgetContent()Returns the content of theParseHttpResponse's body.java.lang.StringgetContentType()Gets theContent-Typeof thisParseHttpResponse.java.lang.StringgetHeader(java.lang.String name)Retrieves the header value from thisParseHttpResponseby the given header name.java.lang.StringgetReasonPhrase()Gets the reason phrase of thisParseHttpResponse.intgetStatusCode()Gets the status code of thisParseHttpResponse.longgetTotalSize()Returns the size of theParseHttpResponse's body.
-
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Gets the status code of thisParseHttpResponse.- Returns:
- The status code of this
ParseHttpResponse.
-
getContent
public java.io.InputStream getContent()
Returns the content of theParseHttpResponse'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 theParseHttpResponse's body.-1if the size of theParseHttpResponse's body is unknown.- Returns:
- The size of the
ParseHttpResponse's body.
-
getReasonPhrase
public java.lang.String getReasonPhrase()
Gets the reason phrase of thisParseHttpResponse.- Returns:
- The reason phrase of this
ParseHttpResponse.
-
getContentType
public java.lang.String getContentType()
Gets theContent-Typeof thisParseHttpResponse.- Returns:
- The
Content-Typeof thisParseHttpResponse.
-
getHeader
public java.lang.String getHeader(java.lang.String name)
Retrieves the header value from thisParseHttpResponseby 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 thisParseHttpResponse.- Returns:
- The headers of this
ParseHttpResponse.
-
-