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 ResponseWriter
cloneWithWriter(Writer writer)
void
close()
void
endCDATA()
void
endDocument()
void
endElement(String name)
void
flush()
protected void
forceFlush()
String
getCharacterEncoding()
String
getContentType()
protected FacesContext
getFacesContext()
protected StreamCharBuffer
getInternalBuffer()
protected StreamCharBuffer
getInternalBuffer(boolean reset)
protected boolean
getWrapScriptContentWithXmlCommentTag()
String
getWriterContentTypeMode()
void
startCDATA()
void
startDocument()
void
startElement(String name, UIComponent uiComponent)
static boolean
supportsContentType(String contentType)
void
write(char[] cbuf)
void
write(char[] cbuf, int off, int len)
void
write(int c)
void
write(String str)
void
write(String str, int off, int len)
void
writeAttribute(String name, Object value, String componentPropertyName)
void
writeComment(Object value)
void
writeText(char[] cbuf, int off, int len)
void
writeText(Object object, UIComponent component, String string)
This method ignores theUIComponent
provided and simply callswriteText(Object,String)
void
writeText(Object value, String componentPropertyName)
void
writeURIAttribute(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:
getContentType
in classResponseWriter
-
getWriterContentTypeMode
public String getWriterContentTypeMode()
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in classResponseWriter
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classResponseWriter
- Throws:
IOException
-
startDocument
public void startDocument()
- Specified by:
startDocument
in classResponseWriter
-
endDocument
public void endDocument() throws IOException
- Specified by:
endDocument
in classResponseWriter
- Throws:
IOException
-
startElement
public void startElement(String name, UIComponent uiComponent) throws IOException
- Specified by:
startElement
in classResponseWriter
- Throws:
IOException
-
startCDATA
public void startCDATA() throws IOException
- Overrides:
startCDATA
in classResponseWriter
- Throws:
IOException
-
endCDATA
public void endCDATA() throws IOException
- Overrides:
endCDATA
in classResponseWriter
- Throws:
IOException
-
endElement
public void endElement(String name) throws IOException
- Specified by:
endElement
in classResponseWriter
- Throws:
IOException
-
writeAttribute
public void writeAttribute(String name, Object value, String componentPropertyName) throws IOException
- Specified by:
writeAttribute
in classResponseWriter
- Throws:
IOException
-
writeURIAttribute
public void writeURIAttribute(String name, Object value, String componentPropertyName) throws IOException
- Specified by:
writeURIAttribute
in classResponseWriter
- Throws:
IOException
-
writeComment
public void writeComment(Object value) throws IOException
- Specified by:
writeComment
in classResponseWriter
- Throws:
IOException
-
writeText
public void writeText(Object value, String componentPropertyName) throws IOException
- Specified by:
writeText
in classResponseWriter
- Throws:
IOException
-
writeText
public void writeText(char[] cbuf, int off, int len) throws IOException
- Specified by:
writeText
in classResponseWriter
- Throws:
IOException
-
cloneWithWriter
public ResponseWriter cloneWithWriter(Writer writer)
- Specified by:
cloneWithWriter
in classResponseWriter
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
write
public void write(char[] cbuf, int off, int len) throws IOException
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
public void write(int c) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public void write(char[] cbuf) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public void write(String str) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public void write(String str, int off, int len) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
writeText
public void writeText(Object object, UIComponent component, String string) throws IOException
This method ignores theUIComponent
provided and simply callswriteText(Object,String)
- Overrides:
writeText
in 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
-
-