org.openide.loaders 5.9.22

org.openide.loaders
Class ExtensionList

java.lang.Object
  extended by org.openide.loaders.ExtensionList
All Implemented Interfaces:
Serializable, Cloneable

public class ExtensionList
extends Object
implements Cloneable, Serializable

Property class that collects a modifiable list of file extensions and permits checking of whether a name or a file object has a given extension. It comes with a property editor to allow the user to modify the extensions.

See Also:
Serialized Form

Constructor Summary
ExtensionList()
          Default constructor.
 
Method Summary
 void addExtension(String ext)
          Add a new extension.
 void addMimeType(String mime)
          Adds new mime type.
 Object clone()
          Clone new object.
 boolean equals(Object o)
           
 Enumeration extensions()
          Get all extensions.
 int hashCode()
           
 boolean isRegistered(FileObject fo)
          Tests whether the file object is acceptable.
 boolean isRegistered(String s)
          Test whether the name in the string is acceptable.
 Enumeration mimeTypes()
          Get all mime types.
 void removeExtension(String ext)
          Remove an extension.
 void removeMimeType(String mime)
          Removes a mime type.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtensionList

public ExtensionList()
Default constructor.

Method Detail

clone

public Object clone()
Clone new object.

Overrides:
clone in class Object

addExtension

public void addExtension(String ext)
Add a new extension.

Parameters:
ext - the extension

removeExtension

public void removeExtension(String ext)
Remove an extension.

Parameters:
ext - the extension

addMimeType

public void addMimeType(String mime)
Adds new mime type.

Parameters:
mime - the mime type

removeMimeType

public void removeMimeType(String mime)
Removes a mime type.

Parameters:
mime - the name of the type

isRegistered

public boolean isRegistered(String s)
Test whether the name in the string is acceptable. It should end with a dot and be one of the registered extenstions.

Parameters:
s - the name
Returns:
true if the name is acceptable

isRegistered

public boolean isRegistered(FileObject fo)
Tests whether the file object is acceptable. Its extension should be registered.

Parameters:
fo - the file object to test
Returns:
true if the file object is acceptable

extensions

public Enumeration extensions()
Get all extensions.

Returns:
enumeration of Strings

mimeTypes

public Enumeration mimeTypes()
Get all mime types.

Returns:
enumeration of Strings

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

org.openide.loaders 5.9.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.