Class WebResponse

java.lang.Object
java.io.OutputStream
javaforce.service.WebResponse
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class WebResponse extends OutputStream
  • Constructor Details

    • WebResponse

      public WebResponse()
  • Method Details

    • write

      public void write(int b) throws IOException
      Specified by:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • getOutputStream

      public OutputStream getOutputStream()
      Returns buffered output stream. When doGet() or doPut() returns the headers and content are sent to client.
      Returns:
      OutputStream
    • setStatus

      public void setStatus(int sc, String msg)
    • setContentType

      public void setContentType(String type)
    • addCookie

      public void addCookie(String name, String value)
    • addHeader

      public void addHeader(String header)
    • sendRedirect

      public void sendRedirect(String url)