Interface MagicDetector

  • All Known Implementing Classes:
    TextFileDetector

    public interface MagicDetector
    Detector genérico de tipo de datos.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDisplayName()
      Get the display name of this detector.
      java.lang.String[] getHandledExtensions()
      Gget a list of file extensions this detector typically deals with.
      java.lang.String[] getHandledTypes()
      Gget a list of types this detector handles.
      java.lang.String getName()
      Get the short name of this detector.
      java.lang.String getVersion()
      Get the version of this plugin.
      java.lang.String[] process​(byte[] data, int offset, int length, long bitmask, char comparator, java.lang.String mimeType, java.util.Map<java.lang.String,​java.lang.String> params)
      Process the stream and return all matching content types.
      java.lang.String[] process​(java.io.File file, int offset, int length, long bitmask, char comparator, java.lang.String mimeType, java.util.Map<java.lang.String,​java.lang.String> params)
      Process the file and return all matching content types.
    • Method Detail

      • getName

        java.lang.String getName()
        Get the short name of this detector.
        Returns:
        Short name of this detector.
      • getDisplayName

        java.lang.String getDisplayName()
        Get the display name of this detector.
        Returns:
        Display name of this detector.
      • getVersion

        java.lang.String getVersion()
        Get the version of this plugin.
        Returns:
        Version of this plugin.
      • getHandledTypes

        java.lang.String[] getHandledTypes()
        Gget a list of types this detector handles.
        Returns:
        List of types this detector handles.
      • getHandledExtensions

        java.lang.String[] getHandledExtensions()
        Gget a list of file extensions this detector typically deals with.
        Returns:
        List of file extensions this detector typically deals with.
      • process

        java.lang.String[] process​(byte[] data,
                                   int offset,
                                   int length,
                                   long bitmask,
                                   char comparator,
                                   java.lang.String mimeType,
                                   java.util.Map<java.lang.String,​java.lang.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

        java.lang.String[] process​(java.io.File file,
                                   int offset,
                                   int length,
                                   long bitmask,
                                   char comparator,
                                   java.lang.String mimeType,
                                   java.util.Map<java.lang.String,​java.lang.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.