Class Hierarchy All Classes All Fields and Methods

 

Class com.sun.faces.renderkit.html_basic.HtmlResponseWriter

java.lang.Object
        java.io.Writer
                javax.faces.context.ResponseWriter
                        com.sun.faces.renderkit.html_basic.HtmlResponseWriter

public class HtmlResponseWriter
extends ResponseWriter

HtmlResponseWriter is an Html specific implementation of the ResponseWriter abstract class. Kudos to Adam Winer (Oracle) for much of this code.

Constructor Index
Constructor Description
HtmlResponseWriter(Writer, String, String) Constructor sets the ResponseWriter and encoding.

Method Index
Method Description
ResponseWriter cloneWithWriter(Writer) Create a new instance of this ResponseWriter using a different Writer.
void close() Methods From java.io.Writer
void endDocument() Output the text for the end of a document.
void endElement(String) Write the end of an element.
void flush() Flush any buffered output to the contained writer.
String getCharacterEncoding()  
String getContentType()  
void startDocument() Write the text that should begin a response.
void startElement(String, UIComponent) Write the start of an element, up to and including the element name.
void write(char)  
void write(char[], int, int)  
void write(int)  
void write(String)  
void write(String, int, int)  
void writeAttribute(String, Object, String) Write a properly escaped attribute name and the corresponding value.
void writeComment(Object) Write a comment string containing the specified text.
void writeText(char) Write a properly escaped single character, If there is an open element that has been created by a call to startElement(), that element will be closed first.
void writeText(char[]) Write properly escaped text from a character array.
void writeText(char[], int, int) Write properly escaped text from a character array.
void writeText(Object, String) Write a properly escaped object.
void writeURIAttribute(String, Object, String) Write a properly encoded URI attribute name and the corresponding value.

 

Constructors

 

HtmlResponseWriter

public HtmlResponseWriter(Writer writer,
                          String contentType,
                          String encoding) throws FacesException

Constructor sets the ResponseWriter and encoding.

 

Methods

 

cloneWithWriter

public ResponseWriter cloneWithWriter(Writer writer) 

Create a new instance of this ResponseWriter using a different Writer.

 

close

public void close() throws IOException

Methods From java.io.Writer

 

endDocument

public void endDocument() throws IOException

Output the text for the end of a document.

 

endElement

public void endElement(String name) throws IOException

Write the end of an element. This method will first close any open element created by a call to startElement().

 

flush

public void flush() throws IOException

Flush any buffered output to the contained writer.

 

getCharacterEncoding

public String getCharacterEncoding() 

 

getContentType

public String getContentType() 

 

startDocument

public void startDocument() throws IOException

Write the text that should begin a response.

 

startElement

public void startElement(String name,
                         UIComponent componentForElement) throws IOException

Write the start of an element, up to and including the element name. Clients call writeAttribute() or writeURIAttribute() methods to add attributes after calling this method.

 

write

public void write(char cbuf) throws IOException

 

write

public void write(char[] cbuf,
                  int off,
                  int len) throws IOException

 

write

public void write(int c) throws IOException

 

write

public void write(String str) throws IOException

 

write

public void write(String str,
                  int off,
                  int len) throws IOException

 

writeAttribute

public void writeAttribute(String name,
                           Object value,
                           String componentPropertyName) throws IOException

Write a properly escaped attribute name and the corresponding value. The value text will be converted to a String if necessary. This method may only be called after a call to startElement(), and before the opened element has been closed.

 

writeComment

public void writeComment(Object comment) throws IOException

Write a comment string containing the specified text. The text will be converted to a String if necessary. If there is an open element that has been created by a call to startElement(), that element will be closed first.

 

writeText

public void writeText(char text) throws IOException

Write a properly escaped single character, If there is an open element that has been created by a call to startElement(), that element will be closed first.

All angle bracket occurrences in the argument must be escaped using the > < syntax.

 

writeText

public void writeText(char[] text) throws IOException

Write properly escaped text from a character array. The output from this command is identical to the invocation: writeText(c, 0, c.length). If there is an open element that has been created by a call to startElement(), that element will be closed first.

All angle bracket occurrences in the argument must be escaped using the > < syntax.

 

writeText

public void writeText(char[] text,
                      int off,
                      int len) throws IOException

Write properly escaped text from a character array. If there is an open element that has been created by a call to startElement(), that element will be closed first.

All angle bracket occurrences in the argument must be escaped using the > < syntax.

 

writeText

public void writeText(Object text,
                      String componentPropertyName) throws IOException

Write a properly escaped object. The object will be converted to a String if necessary. If there is an open element that has been created by a call to startElement(), that element will be closed first.

 

writeURIAttribute

public void writeURIAttribute(String name,
                              Object value,
                              String componentPropertyName) throws IOException

Write a properly encoded URI attribute name and the corresponding value. The value text will be converted to a String if necessary). This method may only be called after a call to startElement(), and before the opened element has been closed.

Class Hierarchy All Classes All Fields and Methods