Enum Doctype

java.lang.Object
java.lang.Enum<Doctype>
com.aoapps.encoding.Doctype
All Implemented Interfaces:
Serializable, Comparable<Doctype>

@ThreadSafe @Immutable public enum Doctype extends Enum<Doctype>
Author:
AO Industries, Inc.
  • Enum Constant Details

    • HTML5

      public static final Doctype HTML5
    • STRICT

      public static final Doctype STRICT
    • TRANSITIONAL

      public static final Doctype TRANSITIONAL
    • FRAMESET

      public static final Doctype FRAMESET
    • NONE

      public static final Doctype NONE
  • Field Details

    • DEFAULT

      public static final Doctype DEFAULT
      The default doctype for older implementations that do not set any.
      See Also:
  • Method Details

    • values

      public static Doctype[] 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

      public static Doctype valueOf(String name)
      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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getXmlDeclaration

      public String getXmlDeclaration(Serialization serialization, String documentEncoding)
    • getXmlDeclaration

      public String getXmlDeclaration(Serialization serialization, Charset documentEncoding)
    • xmlDeclaration

      public boolean xmlDeclaration(Serialization serialization, String documentEncoding, Appendable out) throws IOException
      Returns:
      true when declaration written (including trailing Whitespace.NL)
      Throws:
      IOException
    • xmlDeclaration

      public boolean xmlDeclaration(Serialization serialization, Charset documentEncoding, Appendable out) throws IOException
      Returns:
      true when declaration written (including trailing Whitespace.NL)
      Throws:
      IOException
    • getDoctype

      public abstract String getDoctype(Serialization serialization)
    • doctype

      public boolean doctype(Serialization serialization, Appendable out) throws IOException
      Appends the HTML doctype declaration line, if any.
      Returns:
      true when doctype written (including trailing Whitespace.NL)
      Throws:
      IOException
    • getScriptType

      public abstract String getScriptType()
      Gets the default script type/language attribute, if any.
      Returns:
      The attribute, starting with a space, or "" for none.
    • scriptType

      public Doctype scriptType(Appendable out) throws IOException
      Appends the default script type/language attribute, if any.
      Throws:
      IOException
    • getStyleType

      public abstract String getStyleType()
      Gets the default style type attribute, if any.
      Returns:
      The attribute, starting with a space, or "" for none.
    • styleType

      public Doctype styleType(Appendable out) throws IOException
      Appends the default style type attribute, if any.
      Throws:
      IOException
    • getSupportsIRI

      public boolean getSupportsIRI()
      Does this doctype support RFC 3987 IRI. Unicode format URLs?
    • supportsIRI

      @Deprecated public final boolean supportsIRI()
      Deprecated.
      Please use getSupportsIRI() instead.
      Does this doctype support RFC 3987 IRI. Unicode format URLs?