net.sourceforge.smile.context
Class ResponseWriterImpl

java.lang.Object
  extended byjava.io.Writer
      extended byjavax.faces.context.ResponseWriter
          extended bynet.sourceforge.smile.context.ResponseWriterImpl

public class ResponseWriterImpl
extends javax.faces.context.ResponseWriter

This is the Writer implementation that is used in JSF components, to generate output, such as HTML. In order to support HTML / XML output this Writer has convenience operation to start elements(tags)/documents, write attributes, etc...


Constructor Summary
ResponseWriterImpl(java.io.Writer decorated)
          Constructs a ResponseWriter, that is decorating a Writer object.
 
Method Summary
 void close()
           
 void endDocument()
          Our implementation does not assume it is rendering in any specific format.
 void endElement(java.lang.String name)
           
 void flush()
           
 void startDocument()
          Our implementation does not assume it is rendering in any specific format.
 void startElement(java.lang.String name)
           
 void write(char[] cbuf)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(java.lang.String str)
           
 void write(java.lang.String str, int off, int len)
           
 void writeAttribute(java.lang.String name, java.lang.Object value)
           
 void writeComment(java.lang.Object comment)
           
 void writeText(char c)
           
 void writeText(char[] ca)
           
 void writeText(char[] ca, int offset, int length)
          Writes out a part of a character array.
 void writeText(java.lang.Object value)
           
 void writeURIAttribute(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseWriterImpl

public ResponseWriterImpl(java.io.Writer decorated)
Constructs a ResponseWriter, that is decorating a Writer object. In practice this Writer object will be a PrintWriter, as returned by the HttpServletResponse object.

Parameters:
decorated - The Writer implemetation to decorate.
Method Detail

startDocument

public void startDocument()
                   throws java.io.IOException
Our implementation does not assume it is rendering in any specific format. It's up to the root UIComponent to render HTML/BODY/HEAD tags if it is rendering as HTML, or any other format. So calling this method does NOT write anything !

Throws:
java.io.IOException
See Also:
ResponseWriter.startDocument()

endDocument

public void endDocument()
                 throws java.io.IOException
Our implementation does not assume it is rendering in any specific format. It's up to the root UIComponent to render HTML/BODY/HEAD tags if it is rendering as HTML, or any other format. So calling this method does NOT write anything !

Throws:
java.io.IOException
See Also:
ResponseWriter.endDocument()

startElement

public void startElement(java.lang.String name)
                  throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.startElement(java.lang.String)

endElement

public void endElement(java.lang.String name)
                throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.endElement(java.lang.String)

writeAttribute

public void writeAttribute(java.lang.String name,
                           java.lang.Object value)
                    throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.writeAttribute(java.lang.String, java.lang.Object)

writeURIAttribute

public void writeURIAttribute(java.lang.String name,
                              java.lang.Object value)
                       throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.writeURIAttribute(java.lang.String, java.lang.Object)

writeComment

public void writeComment(java.lang.Object comment)
                  throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.writeComment(java.lang.Object)

writeText

public void writeText(char c)
               throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.writeText(char)

writeText

public void writeText(char[] ca,
                      int offset,
                      int length)
               throws java.io.IOException
Writes out a part of a character array.

Throws:
java.io.IOException
See Also:
ResponseWriter.writeText(char[], int, int)

writeText

public void writeText(char[] ca)
               throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.writeText(char[])

writeText

public void writeText(java.lang.Object value)
               throws java.io.IOException
Throws:
java.io.IOException
See Also:
ResponseWriter.writeText(java.lang.Object)

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
Writer.close()

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
Writer.flush()

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
Writer.write(char[], int, int)

write

public void write(char[] cbuf)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(int c)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.lang.String str)
           throws java.io.IOException
Throws:
java.io.IOException