public class HTTPResponseHeader
extends java.lang.Object
Constructor | Description |
---|---|
HTTPResponseHeader(java.lang.String responseHeader) |
This parses an http response string and creates an Immutable
HTTPResponse object for it. |
HTTPResponseHeader(HTTPResponseCode rCode,
java.lang.String httpVersion) |
This parses an http response string and creates an Immutable
HTTPResponse object for it. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object o) |
|
java.nio.ByteBuffer |
getByteBuffer() |
Returns the header as a read-only
ByteBuffer . |
java.lang.String |
getHTTPVersion() |
Gets the http version.
|
HTTPResponseCode |
getResponseCode() |
Gets the HTTPResponseCode set in this response.
|
int |
hashCode() |
|
int |
length() |
The length in bytes of the http response header.
|
java.lang.String |
toString() |
public HTTPResponseHeader(java.lang.String responseHeader)
HTTPResponse
object for it.responseHeader
- the string to parse into a HTTPResponse
.java.lang.IllegalArgumentException
- If the header fails to parse.public HTTPResponseHeader(HTTPResponseCode rCode, java.lang.String httpVersion)
HTTPResponse
object for it.rCode
- the string to parse into a HTTPResponse
.httpVersion
- the httpVersion to set.java.lang.IllegalArgumentException
- If the header fails to parse.public HTTPResponseCode getResponseCode()
public java.lang.String getHTTPVersion()
public int length()
public java.nio.ByteBuffer getByteBuffer()
ByteBuffer
.
The newline/carriage return is not included!ByteBuffer
of the response header.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