Focus:Fider: Difference between revisions
From Adapt
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== About Fider == | |||
Fider is a Java library that helps identify the file format by using the file's extension and magic numbers. | Fider is a Java library that helps identify the file format by using the file's extension and magic numbers. | ||
It currently identifies ten file formats: US-ASCII, GIF, JPEG, JPEG2000, Adobe PDF, TIFF,MPEG(Video),MEPG/MP3, WAVE and AVI. Fider is designed in a way that it can extend its support to other formats very easily. Without modifying its source code, an independently developed format module can be nicely plugged in. The way how to develope such a module will be documented in the near future. | It currently identifies ten file formats: US-ASCII, GIF, JPEG, JPEG2000, Adobe PDF, TIFF,MPEG(Video),MEPG/MP3, WAVE and AVI. Fider is designed in a way that it can extend its support to other formats very easily. Without modifying its source code, an independently developed format module can be nicely plugged in. The way how to develope such a module will be documented in the near future. | ||
== How to Use Fider == | |||
If an application wants to use Fider to identify a file format, it can do the followings: | If an application wants to use Fider to identify a file format, it can do the followings: | ||
* Import edu.umd.umiacs.adapt.fider package. | * Import edu.umd.umiacs.adapt.fider package. | ||
Line 14: | Line 12: | ||
public static java.lang.String getFormatType(java.lang.String strFile) | public static java.lang.String getFormatType(java.lang.String strFile) | ||
== Class Diagram of Fider == | |||
[[Image:Fider_Class_Diagram_v1.0.jpg]] | [[Image:Fider_Class_Diagram_v1.0.jpg]] |
Latest revision as of 19:51, 10 September 2008
About Fider
Fider is a Java library that helps identify the file format by using the file's extension and magic numbers. It currently identifies ten file formats: US-ASCII, GIF, JPEG, JPEG2000, Adobe PDF, TIFF,MPEG(Video),MEPG/MP3, WAVE and AVI. Fider is designed in a way that it can extend its support to other formats very easily. Without modifying its source code, an independently developed format module can be nicely plugged in. The way how to develope such a module will be documented in the near future.
How to Use Fider
If an application wants to use Fider to identify a file format, it can do the followings:
- Import edu.umd.umiacs.adapt.fider package.
- Make an instance of edu.umd.umiacs.adapt.fider.FRClientInterface class.
- Call getFormatType() method with the path to the format-unknown file as its parameter.
The signature of getFormatType is as follows: public static java.lang.String getFormatType(java.lang.String strFile)