Package it.unimi.dsi.law.warc.util
Class MutableHttpResponse
java.lang.Object
it.unimi.dsi.law.warc.util.AbstractHttpResponse
it.unimi.dsi.law.warc.util.MetadataHttpResponse
it.unimi.dsi.law.warc.util.MutableHttpResponse
- All Implemented Interfaces:
HttpResponse,Response
public class MutableHttpResponse extends MetadataHttpResponse
A mutable extension of
MetadataHttpResponse that provides
support for setting the content stream.
Note that fromWarcRecord(WarcRecord) is not implemented.-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.law.warc.util.MetadataHttpResponse
MetadataHttpResponse.HeaderMap -
Field Summary
Fields inherited from class it.unimi.dsi.law.warc.util.MetadataHttpResponse
headerMap, statusLine, uriFields inherited from class it.unimi.dsi.law.warc.util.AbstractHttpResponse
randomFields inherited from interface it.unimi.dsi.law.warc.util.HttpResponse
DIGEST_HEADER, GUESSED_CHARSET_HEADER, HEADER_CHARSET, ISDUPLICATE_HEADER -
Constructor Summary
Constructors Constructor Description MutableHttpResponse() -
Method Summary
Modifier and Type Method Description MeasurableInputStreamcontentAsStream()Returns the content of this response as a stream.voidcontentAsStream(MeasurableInputStream contentAsStream)Sets the content.booleanfromWarcRecord(WarcRecord wr)Fills this response with the content of aWarcRecord(optional operation).Methods inherited from class it.unimi.dsi.law.warc.util.MetadataHttpResponse
headers, headers, status, statusLine, statusLine, uri, uriMethods inherited from class it.unimi.dsi.law.warc.util.AbstractHttpResponse
toWarcRecord
-
Constructor Details
-
MutableHttpResponse
public MutableHttpResponse()
-
-
Method Details
-
contentAsStream
Sets the content.- Parameters:
contentAsStream- the content.
-
contentAsStream
Description copied from interface:HttpResponseReturns the content of this response as a stream.- Returns:
- the content of this response as a stream.
- Throws:
IOException
-
fromWarcRecord
Description copied from interface:ResponseFills this response with the content of aWarcRecord(optional operation).- Parameters:
wr- the record.- Returns:
- true iff the
record-typeof the given record isresponse. - Throws:
IOException
-