|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
org.apache.pluto.util.PrintWriterServletOutputStream
public class PrintWriterServletOutputStream
This is a specialized class implementing a ServletOutputStream that works in conjunction with a PrintWriter to send data to the browser. It is used when a J2EE server throws an IllegalStateException when you call getOutputStream on a response which someone has previously called getWriter on.
Constructor Summary | |
---|---|
PrintWriterServletOutputStream(PrintWriter pO)
Construct a ServletOutputStream that coordinates output using a base ServletOutputStream and a PrintWriter that is wrapped on top of that OutputStream. |
Method Summary | |
---|---|
void |
close()
Closes the stream |
void |
flush()
Flushes the stream, writing any buffered output bytes |
void |
print(String pVal)
Prints a string. |
void |
println()
Prints a CRLF |
void |
println(String pVal)
Prints an string followed by a CRLF. |
void |
write(byte[] pBuf)
Writes an array of bytes |
void |
write(byte[] pBuf,
int pOffset,
int pLength)
Writes a subarray of bytes |
void |
write(int pVal)
Writes a single byte to the output stream |
Methods inherited from class javax.servlet.ServletOutputStream |
---|
print, print, print, print, print, print, println, println, println, println, println, println |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintWriterServletOutputStream(PrintWriter pO)
Method Detail |
---|
public void write(byte[] pBuf) throws IOException
write
in class OutputStream
pBuf
- the array to be written
IOException
- if an I/O error occurredpublic void write(int pVal) throws IOException
write
in class OutputStream
IOException
public void write(byte[] pBuf, int pOffset, int pLength) throws IOException
write
in class OutputStream
pBuf
- the array to be writtenpOffset
- the offset into the arraypLength
- the number of bytes to write
IOException
- if an I/O error occurredpublic void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
- if an I/O error occurredpublic void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
- if an I/O error occurredpublic void print(String pVal) throws IOException
print
in class javax.servlet.ServletOutputStream
pVal
- the String to be printed
IOException
- if an I/O error has occurredpublic void println(String pVal) throws IOException
println
in class javax.servlet.ServletOutputStream
pVal
- the String to be printed
IOException
- if an I/O error has occurredpublic void println() throws IOException
println
in class javax.servlet.ServletOutputStream
IOException
- if an I/O error has occurred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |