com.groupdocs.merger.domain

Class FileType

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<FileType>


    public final class FileType
    extends Object
    implements com.aspose.ms.System.IEquatable<FileType>

    Represents file type. Provides methods to obtain list of all file types supported by <b>GroupDocs.Merger</b>, detect file type by extension etc.

    • Field Detail

      • BMP

        public static FileType BMP

        Bitmap Image File (.bmp)

      • CSV

        public static FileType CSV

        Comma Separated Values File (.csv)

      • DOC

        public static FileType DOC

        Microsoft Word Document (.doc)

      • DOCM

        public static FileType DOCM

        Word Open XML Macro-Enabled Document (.docm)

      • DOCX

        public static FileType DOCX

        Microsoft Word Open XML Document (.docx)

      • DOT

        public static FileType DOT

        Word Document Template (.dot)

      • DOTM

        public static FileType DOTM

        Word Open XML Macro-Enabled Document Template (.dotm)

      • DOTX

        public static FileType DOTX

        Word Open XML Document Template (.dotx)

      • EPUB

        public static FileType EPUB

        Open eBook File (.epub)

      • HTML

        public static FileType HTML

        Hypertext Markup Language File (.html)

      • JPEG

        public static FileType JPEG

        JPEG Image (.jpeg)

      • MHT

        public static FileType MHT

        MHTML Web Archive (.mht)

      • ODP

        public static FileType ODP

        OpenDocument Presentation (.odp)

      • ODS

        public static FileType ODS

        OpenDocument Spreadsheet (.ods)

      • ODT

        public static FileType ODT

        OpenDocument Text Document (.odt)

      • ONE

        public static FileType ONE

        OneNote Document (.one)

      • OTP

        public static FileType OTP

        OpenDocument Presentation Template (.otp)

      • OTT

        public static FileType OTT

        OpenDocument Document Template (.ott)

      • PDF

        public static FileType PDF

        Portable Document Format File (.pdf)

      • PNG

        public static FileType PNG

        Portable Network Graphic (.png)

      • PPS

        public static FileType PPS

        PowerPoint Slide Show (.pps)

      • PPSX

        public static FileType PPSX

        PowerPoint Open XML Slide Show (.ppsx)

      • PPT

        public static FileType PPT

        PowerPoint Presentation (.ppt)

      • PPTX

        public static FileType PPTX

        PowerPoint Open XML Presentation (.pptx)

      • PS

        public static FileType PS

        PostScript File (.ps)

      • RTF

        public static FileType RTF

        Rich Text Format File (.rtf)

      • TEX

        public static FileType TEX

        LaTeX Source Document (.tex)

      • TSV

        public static FileType TSV

        Tab Separated Values File (.tsv)

      • TXT

        public static FileType TXT

        Plain Text File (.txt)

      • Unknown

        public static FileType Unknown

        Represents unknown file type.

      • VDX

        public static FileType VDX

        Visio Drawing XML File (.vdx)

      • VSDM

        public static FileType VSDM

        Visio Macro-Enabled Drawing (.vsdm)

      • VSDX

        public static FileType VSDX

        Visio Drawing (.vsdx)

      • VSSM

        public static FileType VSSM

        Visio Macro-Enabled Stencil File (.vssm)

      • VSSX

        public static FileType VSSX

        Visio Stencil File (.vssx)

      • VSTM

        public static FileType VSTM

        Visio Macro-Enabled Drawing Template (.vstm)

      • VSTX

        public static FileType VSTX

        Visio Drawing Template (.vstx)

      • VSX

        public static FileType VSX

        Visio Stencil XML File (.vsx)

      • VTX

        public static FileType VTX

        Visio Template XML File (.vtx)

      • XLS

        public static FileType XLS

        Excel Spreadsheet (.xls)

      • XLSB

        public static FileType XLSB

        Excel Binary Spreadsheet (.xlsb)

      • XLSM

        public static FileType XLSM

        Excel Open XML Macro-Enabled Spreadsheet (.xlsm)

      • XLSX

        public static FileType XLSX

        Microsoft Excel Open XML Spreadsheet (.xlsx)

      • XLT

        public static FileType XLT

        Excel Template File (.xlt)

      • XLTM

        public static FileType XLTM

        Excel Open XML Macro-Enabled Spreadsheet Template (.xltm)

      • XLTX

        public static FileType XLTX

        Excel Open XML Spreadsheet Template (.xltx)

      • XPS

        public static FileType XPS

        XML Paper Specification File (.xps)

    • Method Detail

      • equals

        public final boolean equals(FileType other)

        Determines whether the current FileType is the same as specified FileType object.

        Parameters:
        other - The object to compare with the current FileType object.
        Returns:
        true
        if both FileType objects are the same; otherwise,
        false
      • equals

        public boolean equals(Object obj)

        Determines whether the current FileType is the same as specified object.

        Specified by:
        equals in interface com.aspose.ms.System.IEquatable<FileType>
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to compare with the current FileType object.
        Returns:
        true
        if
        obj
        parameter is FileType and is the same as current FileType object; otherwise,
        false
      • fromExtension

        public static FileType fromExtension(String extension)

        Maps file extension to file type.

        Parameters:
        extension - File extension (including the period ".").
        Returns:
        When file type is supported returns it, otherwise returns default Unknown file type.
        Throws:
        com.aspose.ms.System.ArgumentException - Thrown when extension is null or empty string.
      • getExtension

        public final String getExtension()

        Filename suffix (including the period ".") e.g. ".doc".

      • getFileFormat

        public final String getFileFormat()

        File type name e.g. "Microsoft Word Document".

      • getSupportedFileTypes

        public static List<FileType> getSupportedFileTypes()

        Retrieves supported file types

        Returns:
        Returns sequence of supported file types
      • hashCode

        public int hashCode()

        Returns the hash code for the current FileType object.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for the current FileType object.
      • op_Equality

        public static boolean op_Equality(FileType left,
                          FileType right)

        Determines whether two FileType objects are the same.

        Parameters:
        left - Left FileType object.
        right - Right FileType object.
        Returns:
        true
        if both FileType objects are the same; otherwise,
        false
      • op_Inequality

        public static boolean op_Inequality(FileType left,
                            FileType right)

        Determines whether two FileType objects are not the same.

        Parameters:
        left - Left FileType object.
        right - Right FileType object.
        Returns:
        true
        if both FileType objects are not the same; otherwise,
        false
      • setExtension

        public final void setExtension(String value)

        Filename suffix (including the period ".") e.g. ".doc".

      • setFileFormat

        public final void setFileFormat(String value)

        File type name e.g. "Microsoft Word Document".

      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class Object
        Returns:
        A string that represents the current object.