|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
javax.faces.context.ResponseWriter
ResponseWriter is an abstract class describing an
adapter to an underlying output mechanism for character-based output.
In addition to the low-level write() methods inherited from
java.io>Writer, this class provides utility methods
that are useful in producing elements and attributes for markup languages
like HTML and XML.
| Field Summary |
| Fields inherited from class java.io.Writer |
lock |
| Constructor Summary | |
ResponseWriter()
|
|
| Method Summary | |
abstract void |
endDocument()
Write whatever text should end a response. |
abstract void |
endElement(java.lang.String name)
Write the end of an element, after closing any open element created by a call to startElement(). |
abstract void |
startDocument()
Write whatever text should begin a response. |
abstract void |
startElement(java.lang.String name)
Write the start of an element, up to and including the element name. |
abstract void |
writeAttribute(java.lang.String name,
java.lang.Object value)
Write an attribute name and corresponding value (after converting that text to a String if necessary), after escaping it properly. |
abstract void |
writeComment(java.lang.Object comment)
Write a comment containing the specified text, after converting that text to a String if necessary. |
abstract void |
writeText(char text)
Write a single character, after escaping it properly. |
abstract void |
writeText(char[] text)
Write text from a character array, after escaping it properly. |
abstract void |
writeText(char[] text,
int off,
int len)
Write text from a character array, after escaping it properly for this method. |
abstract void |
writeText(java.lang.Object text)
Write an object (after converting it to a String, if necessary), after escaping it properly. |
abstract void |
writeURIAttribute(java.lang.String name,
java.lang.Object value)
Write a URI attribute name and corresponding value (after converting that text to a String if necessary), after encoding it properly (for example, '%' encoded for HTML). |
| Methods inherited from class java.io.Writer |
close, flush, write, write, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ResponseWriter()
| Method Detail |
public abstract void startDocument()
throws java.io.IOException
Write whatever text should begin a response.
java.io.IOException - if an input/output error occurs
public abstract void endDocument()
throws java.io.IOException
Write whatever text should end a response. If there is an open
element that has been created by a call to startElement(),
that element will be closed first.
java.io.IOException - if an input/output error occurs
public abstract void startElement(java.lang.String name)
throws java.io.IOException
Write the start of an element, up to and including the
element name. Once this method has been called, clients can
call writeAttribute() or writeURIAttribute()
method to add attributes and corresponding values. The starting
element will be closed (that is, the trailing '>' character added)
on any subsequent call to startElement(),
writeComment(),
writeText(), endElement(), or
endDocument().
name - Name of the element to be started
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if name
is null
public abstract void endElement(java.lang.String name)
throws java.io.IOException
Write the end of an element, after closing any open element
created by a call to startElement().
name - Name of the element to be ended
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if name
is null
public abstract void writeAttribute(java.lang.String name,
java.lang.Object value)
throws java.io.IOException
Write an attribute name and corresponding value (after converting
that text to a String if necessary), after escaping it properly.
This method may only be called after a call to
startElement(), and before the opened element has been
closed.
name - Attribute name to be addedvalue - Attribute value to be added
java.lang.IllegalStateException - if this method is called when there
is no currently open element
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if name or
value is null
public abstract void writeURIAttribute(java.lang.String name,
java.lang.Object value)
throws java.io.IOException
Write a URI attribute name and corresponding value (after converting
that text to a String if necessary), after encoding it properly
(for example, '%' encoded for HTML).
This method may only be called after a call to
startElement(), and before the opened element has been
closed.
name - Attribute name to be addedvalue - Attribute value to be added
java.lang.IllegalStateException - if this method is called when there
is no currently open element
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if name or
value is null
public abstract void writeComment(java.lang.Object comment)
throws java.io.IOException
Write a comment containing the specified text, after converting
that text 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.
comment - Text content of the comment
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if comment
is null
public abstract void writeText(java.lang.Object text)
throws java.io.IOException
Write an object (after converting it to a String, if necessary),
after escaping it properly. If there is an open element
that has been created by a call to startElement(),
that element will be closed first.
text - Text to be written
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if text
is null
public abstract void writeText(char text)
throws java.io.IOException
Write a single character, after escaping it properly. If there
is an open element that has been created by a call to
startElement(), that element will be closed first.
text - Text to be written
java.io.IOException - if an input/output error occurs
public abstract void writeText(char[] text)
throws java.io.IOException
Write text from a character array, after escaping it properly.
This is equivalent to calling 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.
text - Text to be written
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if text
is null
public abstract void writeText(char[] text,
int off,
int len)
throws java.io.IOException
Write text from a character array, after escaping it properly
for this method. If there is an open element that has been
created by a call to startElement(), that element
will be closed first.
text - Text to be writtenoff - Starting offset (zero-relative)len - Number of characters to be written
java.lang.IndexOutOfBoundsException - if the calculated starting or
ending position is outside the bounds of the character array
java.io.IOException - if an input/output error occurs
java.lang.NullPointerException - if text
is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||