degu.util.mimetypedetector
Class MimeTypeDetectorJMagicMatch

java.lang.Object
  extended by degu.util.mimetypedetector.MimeTypeDetector
      extended by degu.util.mimetypedetector.MimeTypeDetectorJMagicMatch

public class MimeTypeDetectorJMagicMatch
extends MimeTypeDetector

MimeTypeDetector which employs the JMagicMatch library


Field Summary
private  net.sf.jmimemagic.MagicParser magicParser
           
private  java.util.Collection matchers
           
 
Constructor Summary
MimeTypeDetectorJMagicMatch()
           
 
Method Summary
 MimeTypeT detect(byte[] buffer)
           
 void initialize()
           
 
Methods inherited from class degu.util.mimetypedetector.MimeTypeDetector
detect, detect, detect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

magicParser

private net.sf.jmimemagic.MagicParser magicParser

matchers

private java.util.Collection matchers
Constructor Detail

MimeTypeDetectorJMagicMatch

public MimeTypeDetectorJMagicMatch()
Method Detail

detect

public MimeTypeT detect(byte[] buffer)
                 throws FailedToDetectMimeTypeException,
                        NotSupportedMimeTypeException
Specified by:
detect in class MimeTypeDetector
Throws:
FailedToDetectMimeTypeException
NotSupportedMimeTypeException

initialize

public void initialize()
                throws MimeTypeDetectorInitializeException
Specified by:
initialize in class MimeTypeDetector
Throws:
MimeTypeDetectorInitializeException