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
    • getWriter

      public PrintWriter getWriter()
    • setStatus

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

      public void setContentType(String type)
    • getContentType

      public String getContentType()
    • setContentLength

      public void setContentLength(int length)
    • addCookie

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

      public void addHeader(String header)
    • sendRedirect

      public void sendRedirect(String url)
    • getLength

      public int getLength()
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
    • toHashMap

      public HashMap<String,Object> toHashMap()
    • fromHashMap

      public void fromHashMap(HashMap<String,Object> map)