com.caucho.server.http
Class ResponseWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by com.caucho.vfs.AbstractPrintWriter
              extended by com.caucho.server.http.ResponseWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class ResponseWriter
extends AbstractPrintWriter


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ResponseWriter()
           
 
Method Summary
 boolean checkError()
          Checks for an error.
 void clearBuffer()
          Clears the response buffer.
 void close()
           
 void flush()
          Flushes the buffered response to the output stream.
 void flushBuffer()
          Flush the contents of the buffer to the underlying stream.
 int getBufferSize()
           
 int getRemaining()
           
 void init(AbstractResponseStream out)
           
 void setBufferSize(int size)
          Sets the buffer size.
 java.lang.String toString()
           
 void write(char[] buf, int offset, int length)
          Writes a character array to the writer.
 void write(int ch)
          Writes a character to the output.
 void write(java.lang.String s, int off, int len)
          Writes a subsection of a string to the output.
 
Methods inherited from class com.caucho.vfs.AbstractPrintWriter
newLine, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, write, write
 
Methods inherited from class java.io.PrintWriter
append, append, append, clearError, format, format, printf, printf, setError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResponseWriter

public ResponseWriter()
Method Detail

init

public void init(AbstractResponseStream out)

getBufferSize

public int getBufferSize()

setBufferSize

public void setBufferSize(int size)
Sets the buffer size.


getRemaining

public int getRemaining()

checkError

public boolean checkError()
Checks for an error.

Overrides:
checkError in class java.io.PrintWriter

clearBuffer

public void clearBuffer()
Clears the response buffer.


write

public final void write(int ch)
Writes a character to the output.

Specified by:
write in class AbstractPrintWriter
Parameters:
buf - the buffer to write.

write

public final void write(char[] buf,
                        int offset,
                        int length)
Writes a character array to the writer.

Specified by:
write in class AbstractPrintWriter
Parameters:
buf - the buffer to write.
off - the offset into the buffer
len - the number of characters to write

write

public final void write(java.lang.String s,
                        int off,
                        int len)
Writes a subsection of a string to the output.

Specified by:
write in class AbstractPrintWriter

flush

public void flush()
Flushes the buffered response to the output stream.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.PrintWriter

flushBuffer

public void flushBuffer()
Flush the contents of the buffer to the underlying stream.

Parameters:
isEnd - true if the request is done.

close

public void close()
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.PrintWriter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object