Class OutputFormat

  • All Implemented Interfaces:
    Serializable

    public final class OutputFormat
    extends Object
    implements Serializable
    This class defines the various output formats for which a renderer might be available in the document engine. Use the getOutputFormats method of the document engine to check which output formats are actually supported.
    Since:
    6.0
    Author:
    Jon van Leuven, O. Kerpershoek
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static OutputFormat AFP
      This member defines the Advanced Function Presentation (AFP) output format.
      static OutputFormat AWT
      This member defines the AWT output format.
      static OutputFormat CSV
      This member defines the Comma-separated values (CSV) output format.
      static OutputFormat HTML
      This member defines the Hyper Text Markup Language (HTML) output format.
      static OutputFormat PCL
      This member defines the Printer Control Language (PCL) output format.
      static OutputFormat PDF
      This member defines the portable document format (PDF) output format.
      static OutputFormat PNG
      This member defines the Portable Network Graphics (PNG) output format.
      static OutputFormat PS
      This member defines the postscript (PS) output format.
      static OutputFormat RTF
      This member defines the Rich Text Format (RTF) output format.
      static OutputFormat TIFF
      This member defines the Tagged Image File Format (TIFF) output format.
      static OutputFormat TXT
      This member defines the plain text (TXT) output format.
      static OutputFormat XML
      This member defines the Extensible Markup Language (XML) output format.
    • Constructor Summary

      Constructors 
      Constructor Description
      OutputFormat​(String name, String extension, String contentType)
      Constructs the output format for the specified name.
    • Field Detail

      • PDF

        public static final OutputFormat PDF
        This member defines the portable document format (PDF) output format.
      • PS

        public static final OutputFormat PS
        This member defines the postscript (PS) output format.
      • PCL

        public static final OutputFormat PCL
        This member defines the Printer Control Language (PCL) output format.
      • AFP

        public static final OutputFormat AFP
        This member defines the Advanced Function Presentation (AFP) output format.
      • RTF

        public static final OutputFormat RTF
        This member defines the Rich Text Format (RTF) output format.
      • TXT

        public static final OutputFormat TXT
        This member defines the plain text (TXT) output format.
      • AWT

        public static final OutputFormat AWT
        This member defines the AWT output format.
      • PNG

        public static final OutputFormat PNG
        This member defines the Portable Network Graphics (PNG) output format.
      • TIFF

        public static final OutputFormat TIFF
        This member defines the Tagged Image File Format (TIFF) output format.
      • XML

        public static final OutputFormat XML
        This member defines the Extensible Markup Language (XML) output format.
      • HTML

        public static final OutputFormat HTML
        This member defines the Hyper Text Markup Language (HTML) output format.
      • CSV

        public static final OutputFormat CSV
        This member defines the Comma-separated values (CSV) output format.
    • Constructor Detail

      • OutputFormat

        public OutputFormat​(String name,
                            String extension,
                            String contentType)
        Constructs the output format for the specified name. The name is used as identifier, and is thus required.
        Parameters:
        name - The name of the output format.
        extension - The default extension that is used for files of this type.
        contentType - The default content type that is used for files of this type.
    • Method Detail

      • forName

        public static OutputFormat forName​(String name)
        This method returns one of the known output formats for the specified name.
        Parameters:
        name - The name of the requested output format.
        Returns:
        The output format for the specified name.
      • getName

        public String getName()
        This method returns the name of the output format.
        Returns:
        the name of the output format.
      • getExtension

        public String getExtension()
        This method returns the default extension that is used for files of this type.
        Returns:
        the default extension that is used for files of this type.
      • getContentType

        public String getContentType()
        This method returns the default content type that is used for files of this type.
        Returns:
        the default content type that is used for files of this type, may be null
      • hashCode

        public int hashCode()
        This method returns a hash code based on the id of the output format.
        Overrides:
        hashCode in class Object
        Returns:
        hash code based on the data type id.
      • equals

        public boolean equals​(Object obj)
        This method will compare this instance against the object passed to the method, and return true when both are identical.
        Overrides:
        equals in class Object
        Parameters:
        obj - The object that should be used to compare this output format to.
        Returns:
        boolean indicating if the object passed is identical to this output format.