Class ClientFileProxyResponse

java.lang.Object
net.targetr.wtm3.net.http.HttpResponse
net.targetr.rc.client.ClientFileProxyResponse

public class ClientFileProxyResponse extends HttpResponse
Builds a binary response by requesting chunks from another client.
Author:
Dr Michael Gardiner
  • Constructor Details

    • ClientFileProxyResponse

      public ClientFileProxyResponse(ClientFileProxy clientFileProxy) throws IOException, InterruptedException
      Constructs a response to proxy a file from a client.
      Parameters:
      clientFileProxy - the proxy instance driving the transfer
      Throws:
      IOException - if an error occurs setting up headers or fetching chunks
      InterruptedException - if interrupted while waiting for the chunk
  • Method Details

    • write

      public void write(HttpRequest request, OutputStream out) throws Exception
      Description copied from class: HttpResponse
      Writes a response to the OutputStream.
      Overrides:
      write in class HttpResponse
      Parameters:
      request - Request associated with response. Used for logging purposes.
      out - The OutputStream to write the response.
      Throws:
      Exception - If an error occurs while writing the response.