Package htmlcompiler.tools
Enum HTML
java.lang.Object
java.lang.Enum<HTML>
htmlcompiler.tools.HTML
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<HTML>,java.lang.constant.Constable
public enum HTML extends java.lang.Enum<HTML>
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDOCTYPE -
Method Summary
Modifier and Type Method Description static voidaddIntegrityAttributes(org.w3c.dom.Element element, java.lang.String url, java.io.File file, HtmlCompiler html, Logger log)static voidcopyAttributes(org.w3c.dom.Element from, org.w3c.dom.Element to)static voiddeleteTag(org.w3c.dom.Element element)static booleanisLinkFavicon(org.w3c.dom.Element element)static booleanisLinkStyleSheet(org.w3c.dom.Element element)static org.w3c.dom.ElementloadHtml(HtmlCompiler html, java.io.File location)static voidmakeAbsolutePath(org.w3c.dom.Element element, java.lang.String attribute)static org.w3c.dom.ElementnewElementOf(org.w3c.dom.Document document, java.io.File location, HtmlCompiler compiler)static org.w3c.dom.ElementremoveAttributes(org.w3c.dom.Element element, java.lang.String... attributes)static voidreplaceTag(org.w3c.dom.Element original, org.w3c.dom.Element replacement)static java.lang.StringtoDataUrl(java.io.File location)static java.lang.StringtoDataUrl(java.lang.String type, byte[] data)static java.lang.StringtoDataUrl(java.lang.String type, java.io.File location)static org.w3c.dom.ElementtoElementOf(org.w3c.dom.Document document, org.w3c.dom.Element element)static java.lang.StringtoIntegrityValue(byte[] data)static HTMLvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HTML[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Field Details
-
DOCTYPE
public static final java.lang.String DOCTYPE- See Also:
- Constant Field Values
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
copyAttributes
public static void copyAttributes(org.w3c.dom.Element from, org.w3c.dom.Element to) -
removeAttributes
public static org.w3c.dom.Element removeAttributes(org.w3c.dom.Element element, java.lang.String... attributes) -
replaceTag
public static void replaceTag(org.w3c.dom.Element original, org.w3c.dom.Element replacement) -
deleteTag
public static void deleteTag(org.w3c.dom.Element element) -
newElementOf
public static org.w3c.dom.Element newElementOf(org.w3c.dom.Document document, java.io.File location, HtmlCompiler compiler) throws java.lang.Exception- Throws:
java.lang.Exception
-
toElementOf
public static org.w3c.dom.Element toElementOf(org.w3c.dom.Document document, org.w3c.dom.Element element) -
loadHtml
public static org.w3c.dom.Element loadHtml(HtmlCompiler html, java.io.File location) throws java.lang.Exception- Throws:
java.lang.Exception
-
isLinkFavicon
public static boolean isLinkFavicon(org.w3c.dom.Element element) -
isLinkStyleSheet
public static boolean isLinkStyleSheet(org.w3c.dom.Element element) -
toDataUrl
public static java.lang.String toDataUrl(java.io.File location) throws java.io.IOException- Throws:
java.io.IOException
-
toDataUrl
public static java.lang.String toDataUrl(java.lang.String type, java.io.File location) throws java.io.IOException- Throws:
java.io.IOException
-
toDataUrl
public static java.lang.String toDataUrl(java.lang.String type, byte[] data) -
toIntegrityValue
public static java.lang.String toIntegrityValue(byte[] data) throws java.security.NoSuchAlgorithmException- Throws:
java.security.NoSuchAlgorithmException
-
makeAbsolutePath
public static void makeAbsolutePath(org.w3c.dom.Element element, java.lang.String attribute) -
addIntegrityAttributes
public static void addIntegrityAttributes(org.w3c.dom.Element element, java.lang.String url, java.io.File file, HtmlCompiler html, Logger log) throws java.io.IOException, java.security.NoSuchAlgorithmException, javax.xml.transform.TransformerException- Throws:
java.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjavax.xml.transform.TransformerException
-