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
| Signature | Description |
|---|---|
detectFileFormat(fileName: String) → FileFormatInfo | Detects and returns the information about a format of a document stored in a disk file. |
detectFileFormat(stream: java.io.InputStream) → FileFormatInfo | Returns a FileFormatInfo object describing the format of the supplied file |
contentTypeToLoadFormat(contentType: String) → int | Converts IANA content type into a load format enumerated value. |
contentTypeToSaveFormat(contentType: String) → int | Converts IANA content type into a save format enumerated value. |
loadFormatToExtension(loadFormat: int) → String | Converts a load format enumerated value into a file extension. |
saveFormatToLoadFormat(saveFormat: int) → int | Converts a SaveFormat value to a LoadFormat value if possible. |
loadFormatToSaveFormat(loadFormat: int) → int | Converts a LoadFormat value to a SaveFormat value if possible. |
saveFormatToExtension(saveFormat: int) → String | Converts a save format enumerated value into a file extension. |
extensionToSaveFormat(extension: String) → int | Converts a file name extension into a SaveFormat value. |
imageTypeToExtension(imageType: int) → String | Converts an Aspose.Words image type enumerated value into a file extension. |