Package com.jalios.io.mimetype
Class MagicMimeTypeIdentifier
- java.lang.Object
-
- com.jalios.io.mimetype.MagicMimeTypeIdentifier
-
public class MagicMimeTypeIdentifier extends java.lang.ObjectDetermines 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 :UtfUtilMagicNumberMagicMimeTypeIdentifierMagicStringMagicNumber- Since:
- JCMS-5.7.3
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MagicMimeTypeIdentifiergetInstance()protected java.util.ArrayListgetMimeTypeDescriptions()intgetMinArrayLength()java.lang.Stringidentify(byte[] firstBytes)java.lang.Stringidentify(java.io.File file)
-
-
-
Method Detail
-
getInstance
public static MagicMimeTypeIdentifier getInstance()
-
getMimeTypeDescriptions
protected java.util.ArrayList getMimeTypeDescriptions()
-
identify
public java.lang.String identify(java.io.File file)
-
identify
public java.lang.String identify(byte[] firstBytes)
-
getMinArrayLength
public int getMinArrayLength()
-
-