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
public class EarlyFlushHtmlResponseWriterImpl extends HtmlResponseWriterImpl
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
-
-
Constructor Summary
Constructors Constructor Description EarlyFlushHtmlResponseWriterImpl(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseWriter
cloneWithWriter(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 Detail
-
EarlyFlushHtmlResponseWriterImpl
public EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding)
-
EarlyFlushHtmlResponseWriterImpl
public EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag)
-
EarlyFlushHtmlResponseWriterImpl
public EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag, String writerContentTypeMode) throws FacesException
- Throws:
FacesException
-
-
Method Detail
-
cloneWithWriter
public ResponseWriter cloneWithWriter(Writer writer)
- Overrides:
cloneWithWriter
in classHtmlResponseWriterImpl
-
startElement
public void startElement(String name, UIComponent uiComponent) throws IOException
- Overrides:
startElement
in classHtmlResponseWriterImpl
- Throws:
IOException
-
endElement
public void endElement(String name) throws IOException
- Overrides:
endElement
in classHtmlResponseWriterImpl
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classHtmlResponseWriterImpl
- Throws:
IOException
-
-