org.apache.myfaces.tobago.internal.webapp
Class TobagoResponseWriterBase

java.lang.Object
  extended by java.io.Writer
      extended by javax.faces.context.ResponseWriter
          extended by org.apache.myfaces.tobago.webapp.TobagoResponseWriter
              extended by org.apache.myfaces.tobago.internal.webapp.TobagoResponseWriterBase
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
HtmlResponseWriter, XmlResponseWriter

public abstract class TobagoResponseWriterBase
extends TobagoResponseWriter


Field Summary
protected static Set<String> EMPTY_TAG
           
static String XML_VERSION_1_0_ENCODING_UTF_8
          Deprecated. Since Tobago 1.5.3
protected static char[] XML_VERSION_1_0_ENCODING_UTF_8_CHARS
           
static int XML_VERSION_1_0_ENCODING_UTF_8_LENGTH
          Deprecated. Since Tobago 1.5.3
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected TobagoResponseWriterBase(Writer writer, String contentType, String characterEncoding)
           
 
Method Summary
 void close()
           
protected abstract  void closeEmptyTag()
           
protected  void closeOpenTag()
           
 void endDocument()
           
 void endElement(String name)
           
protected  void endElementInternal(Writer writer, String name)
           
protected  String findValue(Object value, String property)
           
 void flush()
           
protected  String getCallingClassStackTraceElementString()
           
 String getCharacterEncoding()
           
protected  javax.faces.component.UIComponent getComponent()
           
 String getContentType()
           
 String getStyleClasses()
          Deprecated. 
protected  Writer getWriter()
           
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)
           
protected  void startElementInternal(Writer writer, String name, javax.faces.component.UIComponent currentComponent)
           
 void write(char[] chars)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int i)
           
 void write(String string)
           
 void write(String string, int i, int i1)
           
 void writeAttribute(String name, Object value, String property)
           
 void writeAttribute(String name, String value, boolean escape)
          Writes a string attribute.
protected  void writeAttributeInternal(Writer writer, String name, String value, boolean escape)
           
 void writeClassAttribute()
          Deprecated. since Tobago 1.5.0
 void writeComment(Object obj)
           
protected  void writeInternal(Writer writer, String string)
           
protected abstract  void writerAttributeValue(String value, boolean escape)
           
 void writeURIAttribute(String name, Object value, String property)
           
 
Methods inherited from class org.apache.myfaces.tobago.webapp.TobagoResponseWriter
cloneWithWriter, endJavascript, getContentTypeWithCharSet, startElement, startJavascript, writeAttribute, writeAttribute, writeAttributeFromComponent, writeClassAttribute, writeClassAttribute, writeClassAttribute, writeIdAttribute, writeJavascript, writeNameAttribute, writeStyleAttribute, writeStyleAttribute, writeText, writeText, writeTextFromComponent
 
Methods inherited from class javax.faces.context.ResponseWriter
writeText, writeText
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_TAG

protected static final Set<String> EMPTY_TAG

XML_VERSION_1_0_ENCODING_UTF_8

@Deprecated
public static final String XML_VERSION_1_0_ENCODING_UTF_8
Deprecated. Since Tobago 1.5.3
See Also:
Constant Field Values

XML_VERSION_1_0_ENCODING_UTF_8_LENGTH

@Deprecated
public static final int XML_VERSION_1_0_ENCODING_UTF_8_LENGTH
Deprecated. Since Tobago 1.5.3

XML_VERSION_1_0_ENCODING_UTF_8_CHARS

protected static final char[] XML_VERSION_1_0_ENCODING_UTF_8_CHARS
Constructor Detail

TobagoResponseWriterBase

protected TobagoResponseWriterBase(Writer writer,
                                   String contentType,
                                   String characterEncoding)
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)

findValue

protected final String findValue(Object value,
                                 String property)

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Specified by:
write in class Writer
Throws:
IOException

write

public void write(String string)
           throws IOException
Specified by:
write in class TobagoResponseWriter
Throws:
IOException

writeInternal

protected final void writeInternal(Writer writer,
                                   String string)
                            throws IOException
Throws:
IOException

write

public void write(int i)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(char[] chars)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(String string,
                  int i,
                  int i1)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in class TobagoResponseWriter
Throws:
IOException

closeOpenTag

protected void closeOpenTag()
                     throws IOException
Throws:
IOException

startDocument

public void startDocument()
                   throws IOException
Specified by:
startDocument in class javax.faces.context.ResponseWriter
Throws:
IOException

endDocument

public void endDocument()
                 throws IOException
Specified by:
endDocument in class javax.faces.context.ResponseWriter
Throws:
IOException

getContentType

public String getContentType()
Specified by:
getContentType in class javax.faces.context.ResponseWriter

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in class javax.faces.context.ResponseWriter

startElement

public void startElement(String name,
                         javax.faces.component.UIComponent currentComponent)
                  throws IOException
Specified by:
startElement in class TobagoResponseWriter
Throws:
IOException

startElementInternal

protected void startElementInternal(Writer writer,
                                    String name,
                                    javax.faces.component.UIComponent currentComponent)
                             throws IOException
Throws:
IOException

endElement

public void endElement(String name)
                throws IOException
Specified by:
endElement in class TobagoResponseWriter
Throws:
IOException

writeComment

public void writeComment(Object obj)
                  throws IOException
Specified by:
writeComment in class TobagoResponseWriter
Throws:
IOException

writeAttribute

public void writeAttribute(String name,
                           Object value,
                           String property)
                    throws IOException
Specified by:
writeAttribute in class TobagoResponseWriter
Throws:
IOException

getCallingClassStackTraceElementString

protected final String getCallingClassStackTraceElementString()

writeURIAttribute

public void writeURIAttribute(String name,
                              Object value,
                              String property)
                       throws IOException
Specified by:
writeURIAttribute in class javax.faces.context.ResponseWriter
Throws:
IOException

writeAttribute

public void writeAttribute(String 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 class TobagoResponseWriter
Throws:
IOException

getStyleClasses

@Deprecated
public String getStyleClasses()
Deprecated. 

Specified by:
getStyleClasses in class TobagoResponseWriter

writeClassAttribute

@Deprecated
public void writeClassAttribute()
                         throws IOException
Deprecated. since Tobago 1.5.0

Description copied from class: TobagoResponseWriter
Write the class attribute. The value will not escaped.

Specified by:
writeClassAttribute in class TobagoResponseWriter
Throws:
IOException

endElementInternal

protected void endElementInternal(Writer writer,
                                  String name)
                           throws IOException
Throws:
IOException

closeEmptyTag

protected abstract void closeEmptyTag()
                               throws IOException
Throws:
IOException

writeAttributeInternal

protected void writeAttributeInternal(Writer writer,
                                      String name,
                                      String value,
                                      boolean escape)
                               throws IOException
Throws:
IOException

writerAttributeValue

protected abstract void writerAttributeValue(String value,
                                             boolean escape)
                                      throws IOException
Throws:
IOException


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.