|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.enterprisedt.net.ftp.FileTypes
public class FileTypes
Attempts to classify files as ASCII or binary via their filename extension. Email support at enterprisedt dot com if you feel we have missed out important file types. Of course, extensions can be registered and unregistered at runtime to customize file types for different applications
Field Summary | |
---|---|
static FileTypes |
ASCII
|
static FileTypes |
BINARY
|
Method Summary | |
---|---|
java.lang.String[] |
extensions()
Get the list of registered file extensions |
boolean |
matches(java.io.File file)
Determines if a file matches this extension type |
boolean |
matches(java.lang.String name)
Determines if a file matches this extension type |
void |
registerExtension(java.lang.String ext)
Register a new file extension |
void |
unregisterExtension(java.lang.String ext)
Unregister a file extension |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final FileTypes ASCII
public static final FileTypes BINARY
Method Detail |
---|
public java.lang.String[] extensions()
public void registerExtension(java.lang.String ext)
ext
- filename extension (excluding ".") to registerpublic void unregisterExtension(java.lang.String ext)
ext
- filename extension (excluding ".") to unregisterpublic boolean matches(java.io.File file)
file
- handle to file
public boolean matches(java.lang.String name)
name
- file's name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |