FileType
Inheritance: java.lang.Object, com.groupdocs.conversion.contracts.Enumeration
public class FileType extends Enumeration
File type base class
Constructors
Constructor | Description |
---|---|
FileType() | Serialization constructor |
Fields
Field | Description |
---|---|
Unknown | Unknown file type |
Methods
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() |
FileType()
public FileType()
Serialization constructor
Unknown
public static final FileType Unknown
Unknown file type
getFileFormat()
public final String getFileFormat()
The file format
Returns: java.lang.String
getExtension()
public final String getExtension()
The file extension
Returns: java.lang.String
getFamily()
public String getFamily()
The file family
Returns: java.lang.String - The file family
getDescription()
public final String getDescription()
Description of the file type
Returns: java.lang.String - description
fromFilename(String fileName)
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
fromExtension(String fileExtension)
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
fromStream(InputStream inputStream)
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
getAllTypes(Class typeOfT)
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.
getAllTypes(Class typeOfT, FileType[] excluded)
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>
getAllTypes(Class typeOfT, FileType[][] excluded)
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>
toString()
public String toString()
String representation
Returns: java.lang.String - String representation of file type
getLoadOptions()
public LoadOptions getLoadOptions()
Prepared default load options for the source file type
Returns: LoadOptions - NULL if there is not file type specific load options
getConvertOptions()
public ConvertOptions getConvertOptions()
Prepared default convert options for the file type
Returns: ConvertOptions - NULL if the conversion to the type not supported
isObsolete()
public boolean isObsolete()
Returns: boolean
equals(Enumeration other)
public boolean equals(Enumeration other)
Determines whether two object instances are equal.
Parameters:
Parameter | Type | Description |
---|---|---|
other | Enumeration |
Returns: boolean
equals(Object obj)
public boolean equals(Object obj)
Determines whether two object instances are equal.
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object |
Returns: boolean
hashCode()
public int hashCode()
Serves as the default hash function.
Returns: int