org.opensolaris.opengrok.analysis
Interface FileAnalyzerFactory.Matcher

Enclosing class:
FileAnalyzerFactory

protected static interface FileAnalyzerFactory.Matcher

Interface for matchers which map file contents to analyzer factories.


Method Summary
 FileAnalyzerFactory isMagic(byte[] contents, java.io.InputStream in)
          Try to match the file contents with an analyzer factory.
 

Method Detail

isMagic

FileAnalyzerFactory isMagic(byte[] contents,
                            java.io.InputStream in)
                            throws java.io.IOException
Try to match the file contents with an analyzer factory. If the method reads from the input stream, it must reset the stream before returning.

Parameters:
contents - the first few bytes of a file
in - the input stream from which the full file can be read
Returns:
an analyzer factory if the contents match, or null if they don't match any factory known by this matcher
Throws:
java.io.IOException