Class FileFormat
java.lang.Object
de.iip_ecosphere.platform.support.FileFormat
- Direct Known Subclasses:
ExtensionBasedFileFormat
Represents a file format, e.g., to indicate which formats are supported by an importer/exporter.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
name
-
description
-
-
Constructor Details
-
FileFormat
Creates an instance.- Parameters:
name- the name of the file formatdescription- a free-text description of the file format (may be null, turned into an empty string then)- Throws:
IllegalArgumentException- ifnameis not given
-
-
Method Details
-
getName
Returns the name of the file format.- Returns:
- the name
-
getDescription
Returns the free-text description of the file format.- Returns:
- the free-text description
-
matches
Returns whether the given file matches the file format. This may be based on an anlysis of magic numbers, the file extension, etc.- Parameters:
file- the file to check- Returns:
trueif the givenfilematches this file format,falseelse
-
toString
-