Class ReaderProcessor

java.lang.Object
org.apache.juneau.rest.processor.ReaderProcessor
All Implemented Interfaces:
ResponseProcessor

public final class ReaderProcessor extends Object implements ResponseProcessor
Response processor for Reader objects.

Simply pipes the contents of the Reader to RestResponse.getNegotiatedWriter().

See Also:
  • Constructor Details

  • Method Details

    • process

      public int process(RestOpSession opSession) throws IOException
      Description copied from interface: ResponseProcessor
      Process this response if possible.
      Specified by:
      process in interface ResponseProcessor
      Parameters:
      opSession - The HTTP call.
      Returns:
      One of the following codes:
      • 0 - The processor could not handle the request.
      • 1 - The processor was able to fully handle the request.
      • 2 - The processor was able to partially handle the request by replacing the output. The response processors should start over.
      Throws:
      IOException - If low-level exception occurred on output stream.
      Results in a HttpServletResponse.SC_INTERNAL_SERVER_ERROR error.