com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class FileFormatUtil



  • public class FileFormatUtil
    extends Object

    Provides utility methods to detect file type.

    • Constructor Detail

      • FileFormatUtil

        public FileFormatUtil()
    • Method Detail

      • detectFileFormat

        public static FileFormatInfo detectFileFormat(InputStream stream)

        Detects and returns the information about a format of a file stored in a stream.

        Parameters:
        stream - Source stream.
        Returns:
        The result FileFormatInfo
      • detectFileFormat

        public static FileFormatInfo detectFileFormat(String filePath)

        Detects and returns the information about a format of a file.

        Parameters:
        filePath - Path to the source file.
        Returns:
        The result FileFormatInfo