org.duelengine.duel
Class HTMLFormatter

java.lang.Object
  extended by org.duelengine.duel.HTMLFormatter

public class HTMLFormatter
extends Object

A simple abstraction for writing HTML. Inherently thread-safe as contains no mutable instance data.


Constructor Summary
HTMLFormatter()
           
 
Method Summary
 HTMLFormatter writeAttribute(Appendable output, String name, String value)
           
 HTMLFormatter writeCloseAttribute(Appendable output)
           
 HTMLFormatter writeCloseElementBeginTag(Appendable output)
           
 HTMLFormatter writeCloseElementVoidTag(Appendable output)
           
 HTMLFormatter writeComment(Appendable output, String value)
           
 HTMLFormatter writeDocType(Appendable output, String value)
           
 HTMLFormatter writeElementEndTag(Appendable output, String tagName)
           
 HTMLFormatter writeLiteral(Appendable output, String value)
           
 HTMLFormatter writeLiteral(Appendable output, String value, boolean encodeNonASCII)
           
 HTMLFormatter writeOpenAttribute(Appendable output, String name)
           
 HTMLFormatter writeOpenElementBeginTag(Appendable output, String tagName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLFormatter

public HTMLFormatter()
Method Detail

writeComment

public HTMLFormatter writeComment(Appendable output,
                                  String value)
                           throws IOException
Throws:
IOException

writeDocType

public HTMLFormatter writeDocType(Appendable output,
                                  String value)
                           throws IOException
Throws:
IOException

writeOpenElementBeginTag

public HTMLFormatter writeOpenElementBeginTag(Appendable output,
                                              String tagName)
                                       throws IOException
Throws:
IOException

writeOpenAttribute

public HTMLFormatter writeOpenAttribute(Appendable output,
                                        String name)
                                 throws IOException
Throws:
IOException

writeCloseAttribute

public HTMLFormatter writeCloseAttribute(Appendable output)
                                  throws IOException
Throws:
IOException

writeAttribute

public HTMLFormatter writeAttribute(Appendable output,
                                    String name,
                                    String value)
                             throws IOException
Throws:
IOException

writeCloseElementBeginTag

public HTMLFormatter writeCloseElementBeginTag(Appendable output)
                                        throws IOException
Throws:
IOException

writeCloseElementVoidTag

public HTMLFormatter writeCloseElementVoidTag(Appendable output)
                                       throws IOException
Throws:
IOException

writeElementEndTag

public HTMLFormatter writeElementEndTag(Appendable output,
                                        String tagName)
                                 throws IOException
Throws:
IOException

writeLiteral

public HTMLFormatter writeLiteral(Appendable output,
                                  String value)
                           throws IOException
Throws:
IOException

writeLiteral

public HTMLFormatter writeLiteral(Appendable output,
                                  String value,
                                  boolean encodeNonASCII)
                           throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.