Class 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.
  • Constructor Details

    • MutableHttpResponse

      public MutableHttpResponse()
  • Method Details

    • contentAsStream

      public void contentAsStream​(MeasurableInputStream contentAsStream)
      Sets the content.
      Parameters:
      contentAsStream - the content.
    • contentAsStream

      public MeasurableInputStream contentAsStream() throws IOException
      Description copied from interface: HttpResponse
      Returns the content of this response as a stream.
      Returns:
      the content of this response as a stream.
      Throws:
      IOException
    • fromWarcRecord

      public boolean fromWarcRecord​(WarcRecord wr) throws IOException
      Description copied from interface: Response
      Fills this response with the content of a WarcRecord (optional operation).
      Parameters:
      wr - the record.
      Returns:
      true iff the record-type of the given record is response.
      Throws:
      IOException