Package com.jalios.io.mimetype
Class MimeTypeDescription
- java.lang.Object
-
- com.jalios.io.mimetype.MimeTypeDescription
-
public class MimeTypeDescription extends java.lang.ObjectLicence 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
-
-
Constructor Summary
Constructors Constructor Description MimeTypeDescription(java.lang.String mimeType, java.lang.String parentType, java.util.ArrayList extensions, java.util.ArrayList magicStrings, java.util.ArrayList magicNumbers, boolean allowsLeadingWhiteSpace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRequiringType(MimeTypeDescription description)Register a requiring MimeTypeDescription on this MimeTypeDescription.booleancontainsExtension(java.lang.String extension)Returns whether the set of file extensions of this MimeTypeDescription contains the specified file extension.booleangetAllowsLeadingWhiteSpace()java.util.ArrayListgetExtensions()java.util.ArrayListgetMagicNumbers()java.util.ArrayListgetMagicStrings()java.lang.StringgetMimeType()java.lang.StringgetParentType()java.util.ArrayListgetRequiringTypes()booleanmatches(byte[] bytes)booleanmatches(char[] chars)
-
-
-
Method Detail
-
getMimeType
public java.lang.String getMimeType()
-
getParentType
public java.lang.String getParentType()
-
getExtensions
public java.util.ArrayList getExtensions()
-
getMagicStrings
public java.util.ArrayList getMagicStrings()
-
getMagicNumbers
public java.util.ArrayList getMagicNumbers()
-
getAllowsLeadingWhiteSpace
public boolean getAllowsLeadingWhiteSpace()
-
addRequiringType
public void addRequiringType(MimeTypeDescription description)
Register a requiring MimeTypeDescription on this MimeTypeDescription. The specified MimeTypeDescription should have at least one Condition that has this MimeTypeDescription's mimeType as parent type.
-
getRequiringTypes
public java.util.ArrayList getRequiringTypes()
-
matches
public boolean matches(char[] chars)
-
matches
public boolean matches(byte[] bytes)
-
containsExtension
public boolean containsExtension(java.lang.String extension)
Returns whether the set of file extensions of this MimeTypeDescription contains the specified file extension.
-
-