| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Convenience base class for Resource implementations, pre-implementing typical behavior.
The "exists" method will check whether a File or InputStream can be opened; "isOpen" will always return false; "getFile" throws an exception; and "toString" will return the description.
Method Summary | |
boolean | equals(Object obj) This implementation compares description strings. |
boolean | exists() This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened. |
File | getFile() This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to an absolute file path. |
int | hashCode() This implementation returns the description's hash code. |
boolean | isOpen() This implementations always returns false. |
String | toString() This implementation returns the description of this resource. |
Method Detail |
public boolean equals(Object obj)
public boolean exists()
public File getFile()
throws java.io.IOException
public int hashCode()
public boolean isOpen()
public String toString()
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |