Class TobagoResponseWriterBase
- java.lang.Object
-
- java.io.Writer
-
- javax.faces.context.ResponseWriter
-
- org.apache.myfaces.tobago.webapp.TobagoResponseWriter
-
- org.apache.myfaces.tobago.internal.webapp.TobagoResponseWriterBase
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
- Direct Known Subclasses:
HtmlResponseWriter
,XmlResponseWriter
public abstract class TobagoResponseWriterBase extends TobagoResponseWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
XML_VERSION_1_0_ENCODING_UTF_8
protected static char[]
XML_VERSION_1_0_ENCODING_UTF_8_CHARS
-
Constructor Summary
Constructors Modifier Constructor Description protected
TobagoResponseWriterBase(Writer writer, String contentType, String characterEncoding)
Deprecated.since 4.3.0protected
TobagoResponseWriterBase(Writer writer, String contentType, Charset charset)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
protected abstract void
closeEmptyTag()
protected void
closeOpenTag()
void
endDocument()
void
endElement(String name)
void
endElement(HtmlElements name)
protected void
endElementInternal(Writer sink, String name, boolean inline)
protected String
findValue(Object value, String property)
void
flush()
protected String
getCallingClassStackTraceElementString()
String
getCharacterEncoding()
protected javax.faces.component.UIComponent
getComponent()
String
getContentType()
protected Writer
getWriter()
protected void
handlePassThroughAttributes()
protected boolean
isStartStillOpen()
protected void
setComponent(javax.faces.component.UIComponent component)
protected void
setStartStillOpen(boolean startStillOpen)
void
startDocument()
void
startElement(String name, javax.faces.component.UIComponent currentComponent)
void
startElement(HtmlElements name)
void
startElement(HtmlElements name, javax.faces.component.UIComponent currentComponent)
protected void
startElementInternal(Writer sink, String name, boolean inline)
void
write(char[] chars)
void
write(char[] cbuf, int off, int len)
void
write(int j)
void
write(String string)
void
write(String string, int j, int k)
void
writeAttribute(String name, Object value, String property)
Deprecated.since 3.0.0void
writeAttribute(MarkupLanguageAttributes name, String value, boolean escape)
Writes a string attribute.void
writeAttribute(MarkupLanguageAttributes name, HtmlTypes types)
protected void
writeAttributeInternal(Writer sink, MarkupLanguageAttributes name, String value, boolean escape)
void
writeComment(Object obj)
protected void
writeInternal(Writer sink, String string)
protected abstract void
writerAttributeValue(String value, boolean escape)
void
writeURIAttribute(String name, Object value, String property)
void
writeURIAttribute(MarkupLanguageAttributes name, String value)
Writes a string attribute URL encoded.-
Methods inherited from class org.apache.myfaces.tobago.webapp.TobagoResponseWriter
cloneWithWriter, endCDATA, getContentTypeWithCharSet, startCDATA, writeAttribute, writeAttribute, writeClassAttribute, writeClassAttribute, writeClassAttribute, writeClassAttribute, writeClassAttribute, writeCommandMapAttribute, writeIdAttribute, writeNameAttribute, writeText, writeText
-
Methods inherited from class javax.faces.context.ResponseWriter
writeDoctype, writePreamble, writeText, writeText
-
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
-
-
-
Field Detail
-
XML_VERSION_1_0_ENCODING_UTF_8
protected static final String XML_VERSION_1_0_ENCODING_UTF_8
- See Also:
- Constant Field Values
-
XML_VERSION_1_0_ENCODING_UTF_8_CHARS
protected static final char[] XML_VERSION_1_0_ENCODING_UTF_8_CHARS
-
-
Method Detail
-
getWriter
protected final Writer getWriter()
-
getComponent
protected final javax.faces.component.UIComponent getComponent()
-
setComponent
protected final void setComponent(javax.faces.component.UIComponent component)
-
isStartStillOpen
protected final boolean isStartStillOpen()
-
setStartStillOpen
protected final void setStartStillOpen(boolean startStillOpen)
-
write
public void write(char[] cbuf, int off, int len) throws IOException
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
public void write(String string) throws IOException
- Specified by:
write
in classTobagoResponseWriter
- Throws:
IOException
-
writeInternal
protected final void writeInternal(Writer sink, String string) throws IOException
- Throws:
IOException
-
write
public void write(int j) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public void write(char[] chars) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public void write(String string, int j, int k) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classTobagoResponseWriter
- Throws:
IOException
-
closeOpenTag
protected void closeOpenTag() throws IOException
- Throws:
IOException
-
handlePassThroughAttributes
protected void handlePassThroughAttributes() throws IOException
- Throws:
IOException
-
startDocument
public void startDocument() throws IOException
- Specified by:
startDocument
in classjavax.faces.context.ResponseWriter
- Throws:
IOException
-
endDocument
public void endDocument() throws IOException
- Specified by:
endDocument
in classjavax.faces.context.ResponseWriter
- Throws:
IOException
-
getContentType
public String getContentType()
- Specified by:
getContentType
in classjavax.faces.context.ResponseWriter
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in classjavax.faces.context.ResponseWriter
-
startElement
public void startElement(String name, javax.faces.component.UIComponent currentComponent) throws IOException
- Specified by:
startElement
in classTobagoResponseWriter
- Throws:
IOException
-
startElement
public void startElement(HtmlElements name, javax.faces.component.UIComponent currentComponent) throws IOException
- Specified by:
startElement
in classTobagoResponseWriter
- Throws:
IOException
-
startElement
public void startElement(HtmlElements name) throws IOException
- Specified by:
startElement
in classTobagoResponseWriter
- Throws:
IOException
-
startElementInternal
protected void startElementInternal(Writer sink, String name, boolean inline) throws IOException
- Throws:
IOException
-
endElement
public void endElement(String name) throws IOException
- Specified by:
endElement
in classTobagoResponseWriter
- Throws:
IOException
-
endElement
public void endElement(HtmlElements name) throws IOException
- Specified by:
endElement
in classTobagoResponseWriter
- Throws:
IOException
-
writeComment
public void writeComment(Object obj) throws IOException
- Specified by:
writeComment
in classTobagoResponseWriter
- Throws:
IOException
-
writeAttribute
@Deprecated public void writeAttribute(String name, Object value, String property) throws IOException
Deprecated.since 3.0.0- Specified by:
writeAttribute
in classTobagoResponseWriter
- Throws:
IOException
-
getCallingClassStackTraceElementString
protected final String getCallingClassStackTraceElementString()
-
writeURIAttribute
public void writeURIAttribute(String name, Object value, String property) throws IOException
- Specified by:
writeURIAttribute
in classTobagoResponseWriter
- Throws:
IOException
-
writeAttribute
public void writeAttribute(MarkupLanguageAttributes name, String value, boolean escape) throws IOException
Description copied from class:TobagoResponseWriter
Writes a string attribute. The renderer may set escape=false to switch of escaping of the string, if it is not necessary.- Specified by:
writeAttribute
in classTobagoResponseWriter
- Throws:
IOException
-
writeAttribute
public void writeAttribute(MarkupLanguageAttributes name, HtmlTypes types) throws IOException
- Specified by:
writeAttribute
in classTobagoResponseWriter
- Throws:
IOException
-
writeURIAttribute
public void writeURIAttribute(MarkupLanguageAttributes name, String value) throws IOException
Description copied from class:TobagoResponseWriter
Writes a string attribute URL encoded.- Specified by:
writeURIAttribute
in classTobagoResponseWriter
- Throws:
IOException
-
endElementInternal
protected void endElementInternal(Writer sink, String name, boolean inline) throws IOException
- Throws:
IOException
-
closeEmptyTag
protected abstract void closeEmptyTag() throws IOException
- Throws:
IOException
-
writeAttributeInternal
protected void writeAttributeInternal(Writer sink, MarkupLanguageAttributes name, String value, boolean escape) throws IOException
- Throws:
IOException
-
writerAttributeValue
protected abstract void writerAttributeValue(String value, boolean escape) throws IOException
- Throws:
IOException
-
-