ninja.utils
Class ResponseStreamsServlet
java.lang.Object
ninja.utils.ResponseStreamsServlet
- All Implemented Interfaces:
- ResponseStreams
public class ResponseStreamsServlet
- extends Object
- implements ResponseStreams
Make sure to only write to either the OutputStream
OR the Writer...
- Author:
- rbauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResponseStreamsServlet
public ResponseStreamsServlet()
init
public void init(javax.servlet.http.HttpServletResponse httpServletResponse)
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Get the output stream to write the response.
Must not be used if getWriter has been called.
- Specified by:
getOutputStream
in interface ResponseStreams
- Returns:
- The output stream
- Throws:
IOException
getWriter
public Writer getWriter()
throws IOException
- Get the writer to write the response.
Must not be used if getOutputStream has been called.
- Specified by:
getWriter
in interface ResponseStreams
- Returns:
- The writer
- Throws:
IOException
Copyright © 2012. All Rights Reserved.