Class DocType
java.lang.Object
com.webfirmframework.wffweb.tag.core.AbstractTagBase
com.webfirmframework.wffweb.tag.core.AbstractJsObject
com.webfirmframework.wffweb.tag.html.AbstractHtml
com.webfirmframework.wffweb.tag.html.DocType
- All Implemented Interfaces:
TagBase
,Serializable
,Cloneable
- Direct Known Subclasses:
Html
- Since:
- 1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.webfirmframework.wffweb.tag.html.AbstractHtml
AbstractHtml.TagType
-
Field Summary
Fields inherited from class com.webfirmframework.wffweb.tag.html.AbstractHtml
noTagContentTypeHtml
Fields inherited from class com.webfirmframework.wffweb.tag.core.AbstractJsObject
wffBMDatas
-
Constructor Summary
ModifierConstructorDescriptionprotected
DocType
(PreIndexedTagName preIndexedTagName, AbstractHtml base, AbstractAttribute[] attributes) should be invoked to generate opening and closing tagDocType
(String tagName, AbstractHtml base, AbstractAttribute[] attributes) should be invoked to generate opening and closing tag -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setDocTypeTag
(String docTypeTag) the default doc type is<!DOCTYPE html>
void
setPrependDocType
(boolean prependDocType) Use this method to produce HTML from very heavy and complicated tag hierarchy.toBigHtmlString
(boolean rebuild) Use this method to produce HTML from very heavy and complicated tag hierarchy.int
Use this method to produce HTML from very heavy and complicated tag hierarchy.int
toBigOutputStream
(OutputStream os, boolean rebuild) Use this method to produce HTML from very heavy and complicated tag hierarchy.int
toBigOutputStream
(OutputStream os, boolean rebuild, String charset) Use this method to produce HTML from very heavy and complicated tag hierarchy.int
toBigOutputStream
(OutputStream os, boolean rebuild, Charset charset) Use this method to produce HTML from very heavy and complicated tag hierarchy.int
toBigOutputStream
(OutputStream os, boolean rebuild, Charset charset, boolean flushOnWrite) Use this method to produce HTML from very heavy and complicated tag hierarchy.int
toBigOutputStream
(OutputStream os, String charset) Use this method to produce HTML from very heavy and complicated tag hierarchy.int
toBigOutputStream
(OutputStream os, Charset charset) Use this method to produce HTML from very heavy and complicated tag hierarchy.gets the html string of the tag including the child tags/values.toHtmlString
(boolean rebuild) rebuilds the html string of the tag including the child tags/values if parameter is true, otherwise returns the html string prebuilt and kept in the cache.int
int
toOutputStream
(OutputStream os, boolean rebuild) int
toOutputStream
(OutputStream os, boolean rebuild, boolean flushOnWrite) int
toOutputStream
(OutputStream os, boolean rebuild, String charset) int
toOutputStream
(OutputStream os, boolean rebuild, Charset charset) int
toOutputStream
(OutputStream os, boolean rebuild, Charset charset, boolean flushOnWrite) int
toOutputStream
(OutputStream os, String charset) int
toOutputStream
(OutputStream os, Charset charset) int
toOutputStream
(OutputStream os, Charset charset, boolean flushOnWrite) toString()
gets the html string of the tag including the child tags/values.Methods inherited from class com.webfirmframework.wffweb.tag.html.AbstractHtml
addAttributes, addAttributes, addAttributes, addChild, addInnerHtml, addInnerHtml, addInnerHtml, addInnerHtml, addInnerHtml, addInnerHtmls, addInnerHtmls, addWffData, appendChild, appendChildren, appendChildren, beforePrintStructure, beforeWritePrintStructureToOutputStream, beforeWritePrintStructureToWffBinaryMessageOutputStream, clone, clone, containsChild, deepClone, getAllNestedChildrenIncludingParent, getAttributeByName, getAttributeHtmlBytesCompressedByIndex, getAttributes, getCharset, getChildAt, getChildren, getChildren, getChildrenAsArray, getChildrenSize, getClosingTag, getDataWffId, getExactTagFromWffBMBytes, getFirstChild, getHtmlMiddleSB, getIndexByChild, getIndexByChild, getLastChild, getOpeningTag, getParent, getPrintStructure, getPrintStructure, getReadLock, getRootTag, getSharedData, getSharedObject, getSharedTagContent, getTagFromWffBMBytes, getTagFromWffBMBytes, getTagFromWffBMBytes, getTagName, getWffData, getWffObjects, getWriteLock, give, give, insertAfter, insertAfterIfPossible, insertBefore, insertBeforeIfPossible, internalId, isHtmlStartSBAsFirst, isSubscribedToSharedTagContent, loopThroughAllNestedChildren, prependChildren, removeAllChildren, removeAttributes, removeAttributes, removeAttributes, removeAttributes, removeAttributes, removeAttributes, removeChild, removeChildren, removeChildren, removeSharedTagContent, removeWffData, replaceWith, replaceWithIfPossible, resetHierarchy, setCharset, setChildren, setDataWffId, setParent, setSharedData, setSharedDataIfNull, subscribeTo, subscribeTo, subscribeTo, toCompressedWffBMBytes, toCompressedWffBMBytesV2, toCompressedWffBMBytesV2, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toWffBMBytes, toWffBMBytes, toWffBMBytes, toWffBMBytes, writePrintStructureToOutputStream, writePrintStructureToOutputStream, writePrintStructureToWffBinaryMessageOutputStream
Methods inherited from class com.webfirmframework.wffweb.tag.core.AbstractJsObject
addWffData, getWffData, removeWffData
Methods inherited from class com.webfirmframework.wffweb.tag.core.AbstractTagBase
equals, getData, hashCode, isModified, isRebuild, setData, setModified, setRebuild
-
Constructor Details
-
DocType
should be invoked to generate opening and closing tag- Parameters:
tagName
-attributes
-
-
DocType
protected DocType(PreIndexedTagName preIndexedTagName, AbstractHtml base, AbstractAttribute[] attributes) should be invoked to generate opening and closing tag- Parameters:
preIndexedTagName
-attributes
-- Since:
- 3.0.3
-
-
Method Details
-
toHtmlString
Description copied from interface:TagBase
gets the html string of the tag including the child tags/values. rebuilds the html string if the child tags/values or attributes have been modified.- Specified by:
toHtmlString
in interfaceTagBase
- Overrides:
toHtmlString
in classAbstractHtml
- Returns:
String
equalent to the html string of the tag including the child tags.
-
toBigHtmlString
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoHtmlString
method which is faster than this method. The advantage oftoBigHtmlString
overtoHtmlString
is it will never throwStackOverflowError
.
NB:- this method has not been undergone all testing process.- Overrides:
toBigHtmlString
in classAbstractHtml
- Returns:
- the HTML string similar to toHtmlString method.
-
toBigHtmlString
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoHtmlString
method which is faster than this method. The advantage oftoBigHtmlString
overtoHtmlString
is it will never throwStackOverflowError
.
NB:- this method has not been undergone all testing process.- Overrides:
toBigHtmlString
in classAbstractHtml
- Parameters:
rebuild
- true to rebuild the tag hierarchy or false to return from cache if available.- Returns:
- the HTML string similar to toHtmlString method.
-
toHtmlString
Description copied from interface:TagBase
rebuilds the html string of the tag including the child tags/values if parameter is true, otherwise returns the html string prebuilt and kept in the cache.- Specified by:
toHtmlString
in interfaceTagBase
- Overrides:
toHtmlString
in classAbstractHtml
- Parameters:
rebuild
- true to rebuild & false to return previously built string.- Returns:
String
equalent to the html string of the tag including the child tags.
-
toOutputStream
- Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.- Returns:
- the total number of bytes written
- Throws:
IOException
-
toOutputStream
- Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.rebuild
- true to rebuild & false to write previously built bytes.- Returns:
- the total number of bytes written
- Throws:
IOException
-
toOutputStream
public int toOutputStream(OutputStream os, boolean rebuild, boolean flushOnWrite) throws IOException - Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.rebuild
- true to rebuild & false to write previously built bytes.flushOnWrite
- true to flush on each write to OutputStream- Returns:
- the total number of bytes written
- Throws:
IOException
-
toOutputStream
- Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- object of OutputStream to which the bytes to be writtencharset
- the charset to encode for the bytes- Returns:
- the total number of bytes written
- Throws:
IOException
- Since:
- 1.0.0
-
toOutputStream
public int toOutputStream(OutputStream os, Charset charset, boolean flushOnWrite) throws IOException - Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- object of OutputStream to which the bytes to be writtencharset
- the charset to encode for the bytesflushOnWrite
- true to flush on each write to OutputStream- Returns:
- the total number of bytes written
- Throws:
IOException
- Since:
- 3.0.2
-
toOutputStream
- Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- object of OutputStream to which the bytes to be writtencharset
- the charset to encode for the bytes- Returns:
- the total number of bytes written
- Throws:
IOException
- Since:
- 1.0.0
-
toOutputStream
- Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- object of OutputStream to which the bytes to be writtenrebuild
- true to rebuild the tagscharset
- the charset to encode for the bytes- Returns:
- the total number of bytes written
- Throws:
IOException
- Since:
- 1.0.0
-
toOutputStream
public int toOutputStream(OutputStream os, boolean rebuild, Charset charset, boolean flushOnWrite) throws IOException - Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- object of OutputStream to which the bytes to be writtenrebuild
- true to rebuild the tagscharset
- the charset to encode for the bytesflushOnWrite
- true to flush on each write to OutputStream- Returns:
- the total number of bytes written
- Throws:
IOException
- Since:
- 3.0.2
-
toOutputStream
- Overrides:
toOutputStream
in classAbstractHtml
- Parameters:
os
- object of OutputStream to which the bytes to be writtenrebuild
- true to rebuild the tagscharset
- the charset to encode for the bytes- Returns:
- the total number of bytes written
- Throws:
IOException
- Since:
- 1.0.0
-
toBigOutputStream
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.- Returns:
- the total number of bytes written
- Throws:
IOException
-
toBigOutputStream
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.rebuild
- true to rebuild & false to write previously built bytes.- Returns:
- the total number of bytes written
- Throws:
IOException
-
toBigOutputStream
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.charset
- the charset- Returns:
- Throws:
IOException
-
toBigOutputStream
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.charset
- the charset- Returns:
- the total number of bytes written
- Throws:
IOException
-
toBigOutputStream
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.rebuild
- true to rebuild & false to write previously built bytes.charset
- the charset- Returns:
- the total number of bytes written
- Throws:
IOException
-
toBigOutputStream
Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.rebuild
- true to rebuild & false to write previously built bytes.charset
- the charset- Returns:
- the total number of bytes written
- Throws:
IOException
-
toBigOutputStream
public int toBigOutputStream(OutputStream os, boolean rebuild, Charset charset, boolean flushOnWrite) throws IOException Description copied from class:AbstractHtml
Use this method to produce HTML from very heavy and complicated tag hierarchy. For normal and simple HTML hierarchy usetoOutputStream
method which is faster than this method. The advantage oftoBigOutputStream
overtoOutputStream
is it will never throwStackOverflowError
and the memory consumed at the time of writing could be available for GC (depends on JVM GC rules).
NB:- this method has not been undergone all testing process.- Overrides:
toBigOutputStream
in classAbstractHtml
- Parameters:
os
- the object ofOutputStream
to write to.rebuild
- true to rebuild & false to write previously built bytes.charset
- the charsetflushOnWrite
- true to flush on each write to OutputStream- Returns:
- the total number of bytes written
- Throws:
IOException
-
toString
Description copied from interface:TagBase
gets the html string of the tag including the child tags/values. rebuilds the html string if the child tags/values or attributes have been modified.- Specified by:
toString
in interfaceTagBase
- Overrides:
toString
in classAbstractHtml
- Returns:
String
equalent to the html string of the tag including the child tags.
-
isPrependDocType
public boolean isPrependDocType()- Returns:
- the prependDocType
- Since:
- 1.0.0
-
setPrependDocType
public void setPrependDocType(boolean prependDocType) - Parameters:
prependDocType
- the prependDocType to set- Since:
- 1.0.0
-
getDocTypeTag
- Returns:
- the docTypeTag
- Since:
- 1.0.0
-
setDocTypeTag
the default doc type is<!DOCTYPE html>
- Parameters:
docTypeTag
- the docTypeTag to set- Since:
- 1.0.0
-