org.apache.myfaces.tobago.internal.util
Class WriterUtils

java.lang.Object
  extended by org.apache.myfaces.tobago.internal.util.WriterUtils
Direct Known Subclasses:
HtmlWriterUtils, JavascriptWriterUtils, JsonWriterUtils

public abstract class WriterUtils
extends Object


Field Summary
protected static char[] EMPTY
           
protected static char[][] ISO8859_1_ENTITIES
           
 
Constructor Summary
WriterUtils(Writer out, String characterEncoding)
           
 
Method Summary
protected  ResponseWriterBuffer getBuffer()
           
protected  Writer getOut()
           
protected  boolean isUtf8()
           
 void writeAttributeValue(String text)
           
protected  void writeDecRef(char ch)
          Writes a character as a decimal escape.
protected abstract  void writeEncodedValue(char[] text, int start, int length, boolean isAttribute)
           
 void writeText(char[] text, int start, int length)
           
 void writeText(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

protected static final char[] EMPTY

ISO8859_1_ENTITIES

protected static final char[][] ISO8859_1_ENTITIES
Constructor Detail

WriterUtils

public WriterUtils(Writer out,
                   String characterEncoding)
Method Detail

writeAttributeValue

public void writeAttributeValue(String text)
                         throws IOException
Throws:
IOException

writeText

public void writeText(String text)
               throws IOException
Throws:
IOException

writeText

public void writeText(char[] text,
                      int start,
                      int length)
               throws IOException
Throws:
IOException

writeEncodedValue

protected abstract void writeEncodedValue(char[] text,
                                          int start,
                                          int length,
                                          boolean isAttribute)
                                   throws IOException
Throws:
IOException

writeDecRef

protected void writeDecRef(char ch)
                    throws IOException
Writes a character as a decimal escape. Hex escapes are smaller than the decimal version, but Netscape didn't support hex escapes until 4.7.4.

Throws:
IOException

getOut

protected final Writer getOut()

getBuffer

protected final ResponseWriterBuffer getBuffer()

isUtf8

protected final boolean isUtf8()


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