Methods Summary |
---|
protected javax.servlet.ServletOutputStream | createOutputStream()Create an instance of a CacheOutputStream to use
outStream = new CacheOutputStream();
return outStream;
|
protected byte[] | getBytes()Get the cached data from this stream
if (outStream != null) {
return outStream.getBytes();
}
return null;
|
public javax.servlet.ServletOutputStream | getOutputStream()Get the replacement output stream
if (stream != null) {
return stream;
}
// make sure writer has not already been initialized
if (writer != null) {
throw new IOException("Writer already in use");
}
stream = createOutputStream();
return stream;
|
public java.io.PrintWriter | getWriter()Get the replacement writer
if (writer != null) {
return writer;
}
// make sure output stream has not already been initialized
if (stream != null) {
throw new IOException("OutputStream already in use");
}
writer = new PrintWriter(new OutputStreamWriter(createOutputStream()));
return writer;
|