org.semanticdesktop.aperture.mime.identifier.magic
Class MimeTypeDescription

java.lang.Object
  extended by org.semanticdesktop.aperture.mime.identifier.magic.MimeTypeDescription

public class MimeTypeDescription
extends Object


Constructor Summary
MimeTypeDescription(String mimeType, String parentType, ArrayList extensions, ArrayList magicStrings, ArrayList magicNumbers, boolean allowsLeadingWhiteSpace)
           
 
Method Summary
 void addRequiringType(MimeTypeDescription description)
          Register a requiring MimeTypeDescription on this MimeTypeDescription.
 boolean containsExtension(String extension)
          Returns whether the set of file extensions of this MimeTypeDescription contains the specified file extension.
 boolean getAllowsLeadingWhiteSpace()
           
 ArrayList getExtensions()
           
 ArrayList getMagicNumbers()
           
 ArrayList getMagicStrings()
           
 String getMimeType()
           
 String getParentType()
           
 ArrayList getRequiringTypes()
           
 boolean matches(byte[] bytes)
           
 boolean matches(char[] chars)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeTypeDescription

public MimeTypeDescription(String mimeType,
                           String parentType,
                           ArrayList extensions,
                           ArrayList magicStrings,
                           ArrayList magicNumbers,
                           boolean allowsLeadingWhiteSpace)
Method Detail

getMimeType

public String getMimeType()

getParentType

public String getParentType()

getExtensions

public ArrayList getExtensions()

getMagicStrings

public ArrayList getMagicStrings()

getMagicNumbers

public 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 ArrayList getRequiringTypes()

matches

public boolean matches(char[] chars)

matches

public boolean matches(byte[] bytes)

containsExtension

public boolean containsExtension(String extension)
Returns whether the set of file extensions of this MimeTypeDescription contains the specified file extension.



Copyright © 2010 Aperture Development Team. All Rights Reserved.