FileType
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.conversion.contracts.Enumeration
public class FileType extends Enumeration
File type base class
| Constructor | Description |
|---|---|
| FileType() | Serialization constructor |
| Field | Description |
|---|---|
| Unknown | Unknown file type |
| Method | Description |
|---|---|
| getFileFormat() | The file format |
| getExtension() | The file extension |
| getFamily() | The file family |
| getDescription() | Description of the file type |
| fromFilename(String fileName) | Returns FileType for specified fileName |
| fromExtension(String fileExtension) | Gets FileType for provided fileExtension |
| fromStream(InputStream inputStream) | Returns FileType for provided document stream |
| Returns all enumeration values. | |
| toString() | String representation |
| getLoadOptions() | Prepared default load options for the source file type |
| getConvertOptions() | Prepared default convert options for the file type |
| isObsolete() | |
| equals(Enumeration other) | |
| equals(Object obj) | |
| hashCode() |
public FileType()
Serialization constructor
public static final FileType Unknown
Unknown file type
public final String getFileFormat()
The file format
Returns: java.lang.String
public final String getExtension()
The file extension
Returns: java.lang.String
public String getFamily()
The file family
Returns: java.lang.String - The file family
public final String getDescription()
Description of the file type
Returns: java.lang.String - description
public static FileType fromFilename(String fileName)
Returns FileType for specified fileName
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileName | java.lang.String | The file name |
Returns: FileType - The file type of specified file name
public static FileType fromExtension(String fileExtension)
Gets FileType for provided fileExtension
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileExtension | java.lang.String | file extension |
Returns: FileType - file type
public static FileType fromStream(InputStream inputStream)
Returns FileType for provided document stream
Parameters:
| Parameter | Type | Description |
|---|---|---|
| inputStream | java.io.InputStream | TStream which will be probed |
Returns: FileType - The file type of provided stream
public static List<FileType> <T>getAllTypes(Class<T> typeOfT)
Returns all enumeration values.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typeOfT | java.lang.Class |
Returns: java.util.List<com.groupdocs.conversion.filetypes.FileType> - Enumerable of file types
T : Enumerated object type.
public static List<FileType> <T>getAllTypes(Class<T> typeOfT, FileType[] excluded)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typeOfT | java.lang.Class |
|
| excluded | FileType[] |
Returns: java.util.List<com.groupdocs.conversion.filetypes.FileType>
public static List<FileType> <T>getAllTypes(Class<T> typeOfT, FileType[][] excluded)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typeOfT | java.lang.Class |
|
| excluded | FileType[] |
Returns: java.util.List<com.groupdocs.conversion.filetypes.FileType>
public String toString()
String representation
Returns: java.lang.String - String representation of file type
public LoadOptions getLoadOptions()
Prepared default load options for the source file type
Returns: LoadOptions - NULL if there is not file type specific load options
public ConvertOptions getConvertOptions()
Prepared default convert options for the file type
Returns: ConvertOptions - NULL if the conversion to the type not supported
public boolean isObsolete()
Returns: boolean
public boolean equals(Enumeration other)
Determines whether two object instances are equal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | Enumeration |
Returns: boolean
public boolean equals(Object obj)
Determines whether two object instances are equal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object |
Returns: boolean
public int hashCode()
Serves as the default hash function.
Returns: int
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.