Package net.sf.jmimemagic
Interface MagicDetector
- All Known Implementing Classes:
TextFileDetector
public interface MagicDetector
Detector genérico de tipo de datos.
-
Method Summary
Modifier and TypeMethodDescriptionGet the display name of this detector.String[]
Gget a list of file extensions this detector typically deals with.String[]
Gget a list of types this detector handles.getName()
Get the short name of this detector.Get the version of this plugin.String[]
process
(byte[] data, int offset, int length, long bitmask, char comparator, String mimeType, Map<String, String> params) Process the stream and return all matching content types.String[]
process
(File file, int offset, int length, long bitmask, char comparator, String mimeType, Map<String, String> params) Process the file and return all matching content types.
-
Method Details
-
getName
String getName()Get the short name of this detector.- Returns:
- Short name of this detector.
-
getDisplayName
String getDisplayName()Get the display name of this detector.- Returns:
- Display name of this detector.
-
getVersion
String getVersion()Get the version of this plugin.- Returns:
- Version of this plugin.
-
getHandledTypes
String[] getHandledTypes()Gget a list of types this detector handles.- Returns:
- List of types this detector handles.
-
getHandledExtensions
String[] getHandledExtensions()Gget a list of file extensions this detector typically deals with.- Returns:
- List of file extensions this detector typically deals with.
-
process
String[] process(byte[] data, int offset, int length, long bitmask, char comparator, String mimeType, Map<String, String> params) Process the stream and return all matching content types.- Parameters:
data
- Datos.offset
- Punto de inicio del análisis.length
- Longitud de los datos a analizar.bitmask
- Máscara para el análisis.comparator
- Caracter esperado.mimeType
- Mimetype.params
- Parámetros.- Returns:
- Matching content types.
-
process
String[] process(File file, int offset, int length, long bitmask, char comparator, String mimeType, Map<String, String> params) Process the file and return all matching content types.- Parameters:
file
- Fichero del que cargar los datos.offset
- Punto de inicio del análisis.length
- Longitud de los datos a analizar.bitmask
- Máscara para el análisis.comparator
- Caracter esperado.mimeType
- Mimetype.params
- Parámetros.- Returns:
- Matching content types.
-