com.jalios.io.mimetype
Class MagicMimeTypeIdentifier

java.lang.Object
  extended by com.jalios.io.mimetype.MagicMimeTypeIdentifier

public class MagicMimeTypeIdentifier
extends Object

Determines the MIME type of a binary resource based on magic number-based heuristics. Licence concern : This method is based upon Aperture MagicMimeTypeIdentifier. The code was modified at the margin to be compatible with JRE 1.4.2. Given the licence of Aperture : Open Software Licence (OSL), this modified code of Aperture classes are held at the disposal on demand at support@jalios.com Concerned classes : UtfUtil MagicNumber MagicMimeTypeIdentifier MagicString MagicNumber

Since:
JCMS-5.7.3

Method Summary
static MagicMimeTypeIdentifier getInstance()
           
protected  ArrayList getMimeTypeDescriptions()
           
 int getMinArrayLength()
           
 String identify(byte[] firstBytes)
           
 String identify(File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MagicMimeTypeIdentifier getInstance()

getMimeTypeDescriptions

protected ArrayList getMimeTypeDescriptions()

identify

public String identify(File file)

identify

public String identify(byte[] firstBytes)

getMinArrayLength

public int getMinArrayLength()


Copyright © 2001-2010 Jalios SA. All Rights Reserved.