Class MimeTypeDescription


  • public class MimeTypeDescription
    extends java.lang.Object
    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
    • 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)  
    • Constructor Detail

      • MimeTypeDescription

        public MimeTypeDescription​(java.lang.String mimeType,
                                   java.lang.String parentType,
                                   java.util.ArrayList extensions,
                                   java.util.ArrayList magicStrings,
                                   java.util.ArrayList magicNumbers,
                                   boolean allowsLeadingWhiteSpace)
    • 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.