|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.tum.cs.commons.xml.XMLWriter<EHTMLElement,EHTMLAttribute>
edu.tum.cs.commons.html.HTMLWriter
public class HTMLWriter
This class is used for writing HTML.
| Nested Class Summary | |
|---|---|
static class |
HTMLWriter.HTMLResolver
The resolver used for the HTMLWriter. |
| Field Summary |
|---|
| Fields inherited from class edu.tum.cs.commons.xml.XMLWriter |
|---|
xmlResolver |
| Constructor Summary | |
|---|---|
HTMLWriter(File file,
CSSManagerBase cssManager)
Creates a new writer for HTML documents. |
|
HTMLWriter(OutputStream stream,
CSSManagerBase cssManager)
Creates a new writer for HTML documents. |
|
HTMLWriter(PrintWriter writer,
CSSManagerBase cssManager)
Creates a new writer for HTML documents. |
|
| Method Summary | |
|---|---|
void |
addAttribute(EHTMLAttribute attribute,
Object value)
Adds an attribute to the currently open element but checks in addition if the attribute may be added at all. |
void |
addRawNewLine()
Adds a line separator with closing and open tag (see XMLWriter.addNewLine(). |
void |
addRawString(String html)
Adds the given text unprocessed to the writer. |
void |
addStdHeader()
This adds a default header for HTML files consisting of the XML header and a DOCTYPE of the xhtml frameset DTD. |
void |
addStdHeader(String encoding)
This adds a default header for HTML files consisting of the XML header and a DOCTYPE of the xhtml frameset DTD. |
| Methods inherited from class edu.tum.cs.commons.xml.XMLWriter |
|---|
addCDataSection, addClosedElement, addClosedTextElement, addComment, addHeader, addNewLine, addPublicDocTypeDefintion, addText, close, closeElement, escape, flush, getCurrentElement, getWriter, openElement, openElement, setSuppressLineBreaks |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLWriter(File file,
CSSManagerBase cssManager)
throws IOException
file - the file to write to.
IOException
public HTMLWriter(OutputStream stream,
CSSManagerBase cssManager)
stream - the stream to print to.
public HTMLWriter(PrintWriter writer,
CSSManagerBase cssManager)
writer - the writer to print to.| Method Detail |
|---|
public void addStdHeader(String encoding)
XML version is set to "1.0", encoding provided by a parameter, and doc type definition to XHTML 1.0 Frameset.
public void addStdHeader()
XML version is set to "1.0", encoding to "UTF-8", and doc type definition to XHTML 1.0 Frameset.
public void addRawString(String html)
addRawString in class XMLWriter<EHTMLElement,EHTMLAttribute>public void addRawNewLine()
XMLWriter.addNewLine().
public void addAttribute(EHTMLAttribute attribute,
Object value)
addAttribute in class XMLWriter<EHTMLElement,EHTMLAttribute>attribute - the attribute to createvalue - its value
HTMLWriterException - if the attribute is not allowed for the current element.
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||