URIResponse, WarcRecord, org.apache.http.HttpMessage, org.apache.http.HttpResponsepublic class HttpResponseWarcRecord extends AbstractWarcRecord implements org.apache.http.HttpResponse, URIResponse
WarcRecord corresponding to a WarcRecord.Type.RESPONSE record type.WarcRecord.Type| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
HTTP_RESPONSE_MSGTYPE |
USE_BURL_PROPERTY, warcHeadersPROTOCOL_VERSION| Constructor | Description |
|---|---|
HttpResponseWarcRecord(java.net.URI targetURI,
org.apache.http.HttpResponse response) |
Builds the record given the response and the target URI (using a
IdentityHttpEntityFactory to store the entity in the record). |
HttpResponseWarcRecord(java.net.URI targetURI,
org.apache.http.HttpResponse response,
HttpEntityFactory hef) |
Builds the record given the response, the target URI, and a
HttpEntityFactory. |
| Modifier and Type | Method | Description |
|---|---|---|
static HttpResponseWarcRecord |
fromPayload(org.apache.http.message.HeaderGroup warcHeaders,
BoundSessionInputBuffer payloadBuffer) |
|
org.apache.http.HttpEntity |
getEntity() |
|
java.util.Locale |
getLocale() |
Deprecated.
|
org.apache.http.ProtocolVersion |
getProtocolVersion() |
|
org.apache.http.StatusLine |
getStatusLine() |
|
org.apache.http.HttpResponse |
response() |
Returns the response part.
|
void |
setEntity(org.apache.http.HttpEntity entity) |
|
void |
setLocale(java.util.Locale loc) |
Deprecated.
|
void |
setReasonPhrase(java.lang.String reason) |
|
void |
setStatusCode(int code) |
|
void |
setStatusLine(org.apache.http.ProtocolVersion ver,
int code) |
|
void |
setStatusLine(org.apache.http.ProtocolVersion ver,
int code,
java.lang.String reason) |
|
void |
setStatusLine(org.apache.http.StatusLine statusline) |
|
java.lang.String |
toString() |
|
java.net.URI |
uri() |
Returns the URI part.
|
protected java.io.InputStream |
writePayload(ByteArraySessionOutputBuffer buffer) |
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamsgetWarcContentLength, getWarcDate, getWarcHeader, getWarcHeaders, getWarcRecordId, getWarcTargetURI, getWarcType, write, writeHeaderspublic static final java.lang.String HTTP_RESPONSE_MSGTYPE
public HttpResponseWarcRecord(java.net.URI targetURI,
org.apache.http.HttpResponse response)
throws java.io.IOException
IdentityHttpEntityFactory to store the entity in the record).targetURI - the target URI.response - the response.java.io.IOExceptionpublic HttpResponseWarcRecord(java.net.URI targetURI,
org.apache.http.HttpResponse response,
HttpEntityFactory hef)
throws java.io.IOException
HttpEntityFactory.targetURI - the target URI.response - the response.hef - the HttpEntityFactory to be used to create the entity stored in the record, if null an IdentityHttpEntityFactory will be used.java.io.IOExceptionpublic static HttpResponseWarcRecord fromPayload(org.apache.http.message.HeaderGroup warcHeaders, BoundSessionInputBuffer payloadBuffer) throws java.io.IOException
java.io.IOExceptionpublic org.apache.http.ProtocolVersion getProtocolVersion()
getProtocolVersion in interface org.apache.http.HttpMessagegetProtocolVersion in class AbstractWarcRecordpublic org.apache.http.StatusLine getStatusLine()
getStatusLine in interface org.apache.http.HttpResponsepublic org.apache.http.HttpEntity getEntity()
getEntity in interface org.apache.http.HttpResponseprotected java.io.InputStream writePayload(ByteArraySessionOutputBuffer buffer) throws java.io.IOException
writePayload in class AbstractWarcRecordjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setStatusLine(org.apache.http.StatusLine statusline)
setStatusLine in interface org.apache.http.HttpResponsepublic void setStatusLine(org.apache.http.ProtocolVersion ver,
int code)
setStatusLine in interface org.apache.http.HttpResponsepublic void setStatusLine(org.apache.http.ProtocolVersion ver,
int code,
java.lang.String reason)
setStatusLine in interface org.apache.http.HttpResponsepublic void setStatusCode(int code)
throws java.lang.IllegalStateException
setStatusCode in interface org.apache.http.HttpResponsejava.lang.IllegalStateExceptionpublic void setReasonPhrase(java.lang.String reason)
throws java.lang.IllegalStateException
setReasonPhrase in interface org.apache.http.HttpResponsejava.lang.IllegalStateExceptionpublic void setEntity(org.apache.http.HttpEntity entity)
setEntity in interface org.apache.http.HttpResponse@Deprecated public java.util.Locale getLocale()
getLocale in interface org.apache.http.HttpResponse@Deprecated public void setLocale(java.util.Locale loc)
setLocale in interface org.apache.http.HttpResponsepublic java.net.URI uri()
URIResponseuri in interface URIResponsepublic org.apache.http.HttpResponse response()
URIResponseresponse in interface URIResponse