public class HTTPResponse
extends java.lang.Object
Constructor | Description |
---|---|
HTTPResponse(HTTPResponseHeader rHeader,
HTTPHeaders headers) |
Creates an
HTTPResponse object. |
HTTPResponse(HTTPResponseCode rCode,
java.lang.String httpVersion,
java.util.Map<java.lang.String,java.lang.String> headers) |
Creates an
HTTPResponse object. |
Modifier and Type | Method | Description |
---|---|---|
static HTTPResponseBuilder |
builder() |
Creates an
HTTPResponseBuilder from this HTTPResponse . |
boolean |
equals(java.lang.Object o) |
|
java.nio.ByteBuffer |
getByteBuffer() |
Gets this
HTTPResponse as a ByteBuffer . |
HTTPHeaders |
getHeaders() |
Gets the
HTTPHeaders for this HTTPResponse object. |
HTTPResponseCode |
getResponseCode() |
Gets the
HTTPResponseCode for this HTTPResponse object. |
HTTPResponseHeader |
getResponseHeader() |
Gets the
HTTPResponseHeader for this HTTPResponse object. |
int |
hashCode() |
|
HTTPResponseBuilder |
makeBuilder() |
Creates an
HTTPResponseBuilder from this HTTPResponse . |
static HTTPResponse |
parseResponse(java.lang.String response) |
Creates a new
HTTPResponse object from a string. |
java.lang.String |
toString() |
public HTTPResponse(HTTPResponseHeader rHeader, HTTPHeaders headers)
HTTPResponse
object.rHeader
- the HTTPResponseHeader
to use for this HTTPResponse
.headers
- the HTTPHeaders
to use for this HTTPResponse
.public HTTPResponse(HTTPResponseCode rCode, java.lang.String httpVersion, java.util.Map<java.lang.String,java.lang.String> headers)
HTTPResponse
object.rCode
- the HTTPResponseCode
to use for this HTTPResponse
.httpVersion
- the HTTP version to use for this HTTPResponse
.headers
- the HTTPHeaders
to use for this HTTPResponse
.public HTTPResponseHeader getResponseHeader()
HTTPResponseHeader
for this HTTPResponse
object.HTTPResponseHeader
for this HTTPResponse
object.public HTTPHeaders getHeaders()
HTTPHeaders
for this HTTPResponse
object.HTTPHeaders
for this HTTPResponse
object.public HTTPResponseCode getResponseCode()
HTTPResponseCode
for this HTTPResponse
object.HTTPResponseCode
for this HTTPResponse
object.public java.nio.ByteBuffer getByteBuffer()
HTTPResponse
as a ByteBuffer
.ByteBuffer
of this HTTPResponse
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public HTTPResponseBuilder makeBuilder()
HTTPResponseBuilder
from this HTTPResponse
. This allows for easy modification of the Response.HTTPResponseBuilder
from this HTTPResponse
.public static HTTPResponseBuilder builder()
HTTPResponseBuilder
from this HTTPResponse
. This allows for easy modification of the Response.HTTPResponseBuilder
from this HTTPResponse
.public static HTTPResponse parseResponse(java.lang.String response) throws HTTPParsingException
HTTPResponse
object from a string.response
- the HTTP Response string to parse.HTTPResponse
from the provided string.HTTPParsingException
- is thrown if there are any problems parsing the HTTPResponse.