Enum Class SVGUtils

java.lang.Object
java.lang.Enum<SVGUtils>
com.e1c.g5.v8.dt.svg.SVGUtils
All Implemented Interfaces:
Serializable, Comparable<SVGUtils>, Constable

public enum SVGUtils extends Enum<SVGUtils>
Scalable Vector Graphics utils
  • Enum Constant Details

    • INSTANCE

      public static final SVGUtils INSTANCE
      Singleton instance of SVGUtils
  • Method Details

    • values

      public static SVGUtils[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SVGUtils valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isSVG

      public boolean isSVG(ByteArrayInputStream imageStream) throws IOException
      Check that given input stream contains valid SVG xml
      Parameters:
      imageStream - input stream to check, cannot be null
      Returns:
      true if specifed stream contains valid SVG xml, false in otherwise
      Throws:
      IOException - in case of given stream not support reset method
    • renderSvgToPng

      public InputStream renderSvgToPng(InputStream svgImageStream)
      Render SVG input stream to PNG input stream
      Parameters:
      svgImageStream - InputStream of SVG to render, cannot be null
      Returns:
      render PNG input stream, or null if an error occured while rendering