Class ModifiedStringApacheHttpResponse

java.lang.Object
ca.uhn.fhir.rest.client.impl.BaseHttpResponse
ca.uhn.fhir.rest.client.apache.ModifiedStringApacheHttpResponse
All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IHttpResponse

public class ModifiedStringApacheHttpResponse extends BaseHttpResponse implements ca.uhn.fhir.rest.client.api.IHttpResponse
Process a modified copy of an existing IHttpResponse with a String containing new content.

Meant to be used with custom interceptors that need to hijack an existing IHttpResponse with new content.

  • Constructor Details

    • ModifiedStringApacheHttpResponse

      public ModifiedStringApacheHttpResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theOrigHttpResponse, String theNewContent, ca.uhn.fhir.util.StopWatch theResponseStopWatch)
  • Method Details

    • bufferEntity

      public void bufferEntity() throws IOException
      Specified by:
      bufferEntity in interface ca.uhn.fhir.rest.client.api.IHttpResponse
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • createReader

      public Reader createReader() throws IOException
      Specified by:
      createReader in interface ca.uhn.fhir.rest.client.api.IHttpResponse
      Throws:
      IOException
    • getAllHeaders

      Specified by:
      getAllHeaders in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • getHeaders

      public List<String> getHeaders(String theName)
      Specified by:
      getHeaders in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • getMimeType

      public String getMimeType()
      Specified by:
      getMimeType in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • getRequestStopWatch

      public ca.uhn.fhir.util.StopWatch getRequestStopWatch()
      Specified by:
      getRequestStopWatch in interface ca.uhn.fhir.rest.client.api.IHttpResponse
      Overrides:
      getRequestStopWatch in class BaseHttpResponse
    • getResponse

      public Object getResponse()
      Specified by:
      getResponse in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • getStatus

      public int getStatus()
      Specified by:
      getStatus in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • getStatusInfo

      Specified by:
      getStatusInfo in interface ca.uhn.fhir.rest.client.api.IHttpResponse
    • readEntity

      Specified by:
      readEntity in interface ca.uhn.fhir.rest.client.api.IHttpResponse