Class HtmlResponseWriterImpl
- java.lang.Object
-
- java.io.Writer
-
- jakarta.faces.context.ResponseWriter
-
- org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
EarlyFlushHtmlResponseWriterImpl,HtmlBufferResponseWriterWrapper
public class HtmlResponseWriterImpl extends ResponseWriter
-
-
Constructor Summary
Constructors Constructor Description HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding)HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag)HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag, String writerContentTypeMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseWritercloneWithWriter(Writer writer)voidclose()voidendCDATA()voidendDocument()voidendElement(String name)voidflush()protected voidforceFlush()StringgetCharacterEncoding()StringgetContentType()protected FacesContextgetFacesContext()protected StreamCharBuffergetInternalBuffer()protected StreamCharBuffergetInternalBuffer(boolean reset)protected booleangetWrapScriptContentWithXmlCommentTag()StringgetWriterContentTypeMode()voidstartCDATA()voidstartDocument()voidstartElement(String name, UIComponent uiComponent)static booleansupportsContentType(String contentType)voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(String str)voidwrite(String str, int off, int len)voidwriteAttribute(String name, Object value, String componentPropertyName)voidwriteComment(Object value)voidwriteText(char[] cbuf, int off, int len)voidwriteText(Object object, UIComponent component, String string)This method ignores theUIComponentprovided and simply callswriteText(Object,String)voidwriteText(Object value, String componentPropertyName)voidwriteURIAttribute(String name, Object value, String componentPropertyName)-
Methods inherited from class jakarta.faces.context.ResponseWriter
writeDoctype, writePreamble
-
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
-
-
-
Constructor Detail
-
HtmlResponseWriterImpl
public HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding)
-
HtmlResponseWriterImpl
public HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag)
-
HtmlResponseWriterImpl
public HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag, String writerContentTypeMode) throws FacesException
- Throws:
FacesException
-
-
Method Detail
-
supportsContentType
public static boolean supportsContentType(String contentType)
-
getContentType
public String getContentType()
- Specified by:
getContentTypein classResponseWriter
-
getWriterContentTypeMode
public String getWriterContentTypeMode()
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncodingin classResponseWriter
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin classResponseWriter- Throws:
IOException
-
startDocument
public void startDocument()
- Specified by:
startDocumentin classResponseWriter
-
endDocument
public void endDocument() throws IOException- Specified by:
endDocumentin classResponseWriter- Throws:
IOException
-
startElement
public void startElement(String name, UIComponent uiComponent) throws IOException
- Specified by:
startElementin classResponseWriter- Throws:
IOException
-
startCDATA
public void startCDATA() throws IOException- Overrides:
startCDATAin classResponseWriter- Throws:
IOException
-
endCDATA
public void endCDATA() throws IOException- Overrides:
endCDATAin classResponseWriter- Throws:
IOException
-
endElement
public void endElement(String name) throws IOException
- Specified by:
endElementin classResponseWriter- Throws:
IOException
-
writeAttribute
public void writeAttribute(String name, Object value, String componentPropertyName) throws IOException
- Specified by:
writeAttributein classResponseWriter- Throws:
IOException
-
writeURIAttribute
public void writeURIAttribute(String name, Object value, String componentPropertyName) throws IOException
- Specified by:
writeURIAttributein classResponseWriter- Throws:
IOException
-
writeComment
public void writeComment(Object value) throws IOException
- Specified by:
writeCommentin classResponseWriter- Throws:
IOException
-
writeText
public void writeText(Object value, String componentPropertyName) throws IOException
- Specified by:
writeTextin classResponseWriter- Throws:
IOException
-
writeText
public void writeText(char[] cbuf, int off, int len) throws IOException- Specified by:
writeTextin classResponseWriter- Throws:
IOException
-
cloneWithWriter
public ResponseWriter cloneWithWriter(Writer writer)
- Specified by:
cloneWithWriterin classResponseWriter
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
write
public void write(char[] cbuf, int off, int len) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
write
public void write(int c) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(char[] cbuf) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String str) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String str, int off, int len) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
writeText
public void writeText(Object object, UIComponent component, String string) throws IOException
This method ignores theUIComponentprovided and simply callswriteText(Object,String)- Overrides:
writeTextin classResponseWriter- Throws:
IOException- Since:
- 1.2
-
getInternalBuffer
protected StreamCharBuffer getInternalBuffer()
-
getInternalBuffer
protected StreamCharBuffer getInternalBuffer(boolean reset)
-
getFacesContext
protected FacesContext getFacesContext()
-
getWrapScriptContentWithXmlCommentTag
protected boolean getWrapScriptContentWithXmlCommentTag()
-
forceFlush
protected void forceFlush() throws IOException- Throws:
IOException
-
-