|
||||||||||
| 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.portals.gems.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(java.io.PrintWriter pO)
Deprecated. since 1.0RC3; use PrintWriterServletOutputStream Construct a ServletOutputStream that coordinates output using a base ServletOutputStream and a PrintWriter that is wrapped on top of that OutputStream. |
|
PrintWriterServletOutputStream(java.io.PrintWriter pw,
java.lang.String encoding)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream |
void |
flush()
Flushes the stream, writing any buffered output bytes |
void |
print(java.lang.String pVal)
Prints a string. |
void |
println()
Prints a CRLF |
void |
println(java.lang.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 This implementation redirects it's input into the underlying PrintWriter. |
void |
write(int pVal)
Writes a single byte to the output stream This implementation writes the byte to the underlying PrintWriter. |
| 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(java.io.PrintWriter pO)
Construct a ServletOutputStream that coordinates output using a base ServletOutputStream and a PrintWriter that is wrapped on top of that OutputStream.
public PrintWriterServletOutputStream(java.io.PrintWriter pw,
java.lang.String encoding)
| Method Detail |
|---|
public void write(int pVal)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] pBuf)
throws java.io.IOException
write in class java.io.OutputStreampBuf - the array to be written
java.io.IOException - if an I/O error occurred
public void write(byte[] pBuf,
int pOffset,
int pLength)
throws java.io.IOException
write in class java.io.OutputStreampBuf - the array to be writtenpOffset - the offset into the arraypLength - the number of bytes to write
java.io.IOException - if an I/O error occurred
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurred
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurred
public void print(java.lang.String pVal)
throws java.io.IOException
print in class javax.servlet.ServletOutputStreampVal - the String to be printed
java.io.IOException - if an I/O error has occurred
public void println(java.lang.String pVal)
throws java.io.IOException
println in class javax.servlet.ServletOutputStreampVal - the String to be printed
java.io.IOException - if an I/O error has occurred
public void println()
throws java.io.IOException
println in class javax.servlet.ServletOutputStreamjava.io.IOException - if an I/O error has occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||