|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectServletOutputStream
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.
Field Summary | |
---|---|
private java.lang.String |
characterEncoding
The character encoding of the response. |
(package private) java.io.PrintWriter |
mPrintWriter
The PrintWriter that is wrapped on top of the base input stream |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.io.PrintWriter mPrintWriter
private java.lang.String characterEncoding
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
java.io.IOException
public void write(byte[] pBuf) throws java.io.IOException
pBuf
- the array to be written
java.io.IOException
- if an I/O error occurredpublic void write(byte[] pBuf, int pOffset, int pLength) throws java.io.IOException
pBuf
- the array to be writtenpOffset
- the offset into the arraypLength
- the number of bytes to write
java.io.IOException
- if an I/O error occurredpublic void flush() throws java.io.IOException
java.io.IOException
- if an I/O error occurredpublic void close() throws java.io.IOException
java.io.IOException
- if an I/O error occurredpublic void print(java.lang.String pVal) throws java.io.IOException
pVal
- the String to be printed
java.io.IOException
- if an I/O error has occurredpublic void println(java.lang.String pVal) throws java.io.IOException
pVal
- the String to be printed
java.io.IOException
- if an I/O error has occurredpublic void println() throws java.io.IOException
java.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 |