|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DirectoryEntry
This interface represents a single resource on a hierarchical system, such as a file system.
| Field Summary | |
|---|---|
static FileDefinition |
TYPE_FILE
|
static FolderDefinition |
TYPE_FOLDER
|
| Method Summary | |
|---|---|
boolean |
canRead()
Return whether it is possible to read from this DirectoryEntry, and whether an input stream can be obtained for this entry. |
boolean |
canWrite()
Return whether it is possible to write to this DirectoryEntry, and whether an output stream can be obtained for this entry. |
java.io.InputStream |
getInputStream()
If this DirectoryEntry is readable, then return an InputStream instance to the resource represented by this entry. |
java.io.OutputStream |
getOutputStream()
If this DirectoryEntry is writable, then return an OutputStream instance to the resource represented by this entry. |
boolean |
loadPreview()
Load property values associated with this DirectoryEntry and return whether the preview properties are now available. |
java.net.URL |
toURL()
Converts this abstract pathname into a URL. |
| Methods inherited from interface com.metamatrix.common.tree.TreeNode |
|---|
compareTo, equals, exists, getFullName, getName, getNamespace, getSeparator, getSeparatorChar, getType, isModified, toString |
| Field Detail |
|---|
static final FileDefinition TYPE_FILE
static final FolderDefinition TYPE_FOLDER
| Method Detail |
|---|
boolean canWrite()
exists()
returns true).
- Returns:
- true if writing is possible, as well as whether an OutputStream instance
can be obtained by calling the
getOutputStream() method.
boolean canRead()
exists()
returns false).
- Returns:
- true if reading is possible, as well as whether an InputStream instance
can be obtained by calling the
getInputStream() method.
boolean loadPreview()
java.io.InputStream getInputStream()
throws java.io.IOException
java.lang.AssertionError - if this method is called on a DirectoryEntry
for which canRead() returns false.
java.io.IOException - if there was an error creating the stream
java.io.OutputStream getOutputStream()
throws java.io.IOException
java.lang.AssertionError - if this method is called on a DirectoryEntry
for which canWrite() returns false.
java.io.IOException - if there was an error creating the stream
java.net.URL toURL()
throws java.net.MalformedURLException
java.net.MalformedURLException - if the URL is malformed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||