Class EarlyFlushHtmlResponseWriterImpl
java.lang.Object
java.io.Writer
jakarta.faces.context.ResponseWriter
org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl
org.apache.myfaces.renderkit.html.EarlyFlushHtmlResponseWriterImpl
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
This implementation is just the default html response writer with the early flush logic. The
idea is detect when the end "head" element is rendered and in that moment, when the flush call
is done, force the flush of the current underlying writer.
- Author:
- Leonardo Uribe
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEarlyFlushHtmlResponseWriterImpl
(Writer writer, String contentType, String characterEncoding) EarlyFlushHtmlResponseWriterImpl
(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag) EarlyFlushHtmlResponseWriterImpl
(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag, String writerContentTypeMode) -
Method Summary
Modifier and TypeMethodDescriptioncloneWithWriter
(Writer writer) void
endElement
(String name) void
flush()
void
startElement
(String name, UIComponent uiComponent) Methods inherited from class org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl
close, endCDATA, endDocument, forceFlush, getCharacterEncoding, getContentType, getFacesContext, getInternalBuffer, getInternalBuffer, getWrapScriptContentWithXmlCommentTag, getWriterContentTypeMode, startCDATA, startDocument, supportsContentType, write, write, write, write, write, writeAttribute, writeComment, writeText, writeText, writeText, writeURIAttribute
Methods inherited from class jakarta.faces.context.ResponseWriter
writeDoctype, writePreamble
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
Constructor Details
-
EarlyFlushHtmlResponseWriterImpl
-
EarlyFlushHtmlResponseWriterImpl
-
EarlyFlushHtmlResponseWriterImpl
public EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag, String writerContentTypeMode) throws FacesException - Throws:
FacesException
-
-
Method Details
-
cloneWithWriter
- Overrides:
cloneWithWriter
in classHtmlResponseWriterImpl
-
startElement
- Overrides:
startElement
in classHtmlResponseWriterImpl
- Throws:
IOException
-
endElement
- Overrides:
endElement
in classHtmlResponseWriterImpl
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classHtmlResponseWriterImpl
- Throws:
IOException
-