public static final class ParseHttpResponse.Builder extends Object
ParseHttpResponse.| Constructor and Description |
|---|
ParseHttpResponse.Builder()
Creates an empty
Builder. |
ParseHttpResponse.Builder(ParseHttpResponse response)
Makes a new
Builder based on the given ParseHttpResponse. |
| Modifier and Type | Method and Description |
|---|---|
ParseHttpResponse.Builder |
addHeader(String name,
String value)
Adds a header to this
Builder. |
ParseHttpResponse.Builder |
addHeaders(Map<String,String> headers)
Adds headers to this
Builder. |
ParseHttpResponse |
build()
Builds a
ParseHttpResponse by this Builder. |
ParseHttpResponse.Builder |
setContent(InputStream content)
Sets the content of this
Builder. |
ParseHttpResponse.Builder |
setContentType(String contentType)
Sets the content type of this
Builder. |
ParseHttpResponse.Builder |
setHeaders(Map<String,String> headers)
Sets headers of this
Builder. |
ParseHttpResponse.Builder |
setReasonPhrase(String reasonPhrase)
Sets the reason phrase of this
Builder. |
ParseHttpResponse.Builder |
setStatusCode(int statusCode)
Sets the status code of this
Builder. |
ParseHttpResponse.Builder |
setTotalSize(long totalSize)
Sets the total size of this
Builder. |
public ParseHttpResponse.Builder()
Builder.public ParseHttpResponse.Builder(ParseHttpResponse response)
Builder based on the given ParseHttpResponse.response - The ParseHttpResponse where the Builder's values come from.public ParseHttpResponse.Builder setStatusCode(int statusCode)
Builder.statusCode - The status code of this Builder.Builder.public ParseHttpResponse.Builder setContent(InputStream content)
Builder.content - The content of this Builder.Builder.public ParseHttpResponse.Builder setTotalSize(long totalSize)
Builder.totalSize - The total size of this Builder.Builder.public ParseHttpResponse.Builder setReasonPhrase(String reasonPhrase)
Builder.reasonPhrase - The reason phrase of this Builder.Builder.public ParseHttpResponse.Builder setHeaders(Map<String,String> headers)
Builder. All existing headers will be cleared.headers - The headers of this Builder.Builder.public ParseHttpResponse.Builder addHeaders(Map<String,String> headers)
Builder.headers - The headers that need to be added.Builder.public ParseHttpResponse.Builder addHeader(String name, String value)
Builder.name - The name of the header.value - The value of the header.Builder.public ParseHttpResponse.Builder setContentType(String contentType)
Builder.contentType - The Content-Type of this Builder.Builder.public ParseHttpResponse build()
ParseHttpResponse by this Builder.ParseHttpResponse built on this Builder.