FileFormatUtil

FileFormatUtil

Overview

FileFormatUtil is a class in Aspose.Words FOSS for Java.

Provides utility methods for working with file formats, such as detecting file format or converting file extensions to/from file format enums.

Edition status of its 9 listed members (a property and its accessor methods are listed separately, overloads once): 9 not yet exercised by a verified example.

This class declares 10 methods for FileFormatUtil objects in Java programs. Available methods include: contentTypeToLoadFormat, contentTypeToSaveFormat, detectFileFormat, extensionToSaveFormat, imageTypeToExtension, loadFormatToExtension, loadFormatToSaveFormat, saveFormatToExtension, saveFormatToLoadFormat. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.

Methods

SignatureDescription
detectFileFormat(fileName: String) → FileFormatInfoDetects and returns the information about a format of a document stored in a disk file.
detectFileFormat(stream: java.io.InputStream) → FileFormatInfoReturns a FileFormatInfo object describing the format of the supplied file
contentTypeToLoadFormat(contentType: String) → intConverts IANA content type into a load format enumerated value.
contentTypeToSaveFormat(contentType: String) → intConverts IANA content type into a save format enumerated value.
loadFormatToExtension(loadFormat: int) → StringConverts a load format enumerated value into a file extension.
saveFormatToLoadFormat(saveFormat: int) → intConverts a SaveFormat value to a LoadFormat value if possible.
loadFormatToSaveFormat(loadFormat: int) → intConverts a LoadFormat value to a SaveFormat value if possible.
saveFormatToExtension(saveFormat: int) → StringConverts a save format enumerated value into a file extension.
extensionToSaveFormat(extension: String) → intConverts a file name extension into a SaveFormat value.
imageTypeToExtension(imageType: int) → StringConverts an Aspose.Words image type enumerated value into a file extension.

See Also