|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.util.filesystem.FileObject
org.das2.util.filesystem.WebFileObject
public class WebFileObject
Constructor Summary | |
---|---|
protected |
WebFileObject(WebFileSystem wfs,
java.lang.String pathname,
java.util.Date modifiedDate)
|
Method Summary | |
---|---|
boolean |
canRead()
returns true if the file can be read by the client. |
boolean |
exists()
returns true if the file exists. |
java.nio.channels.ReadableByteChannel |
getChannel(ProgressMonitor monitor)
return a Channel for the resource. |
FileObject[] |
getChildren()
returns objects within a folder. |
java.io.File |
getFile(ProgressMonitor monitor)
gets a File object that can be opened by the client. |
java.io.InputStream |
getInputStream(ProgressMonitor monitor)
opens an inputStream, perhaps transferring the file to a cache first. |
protected java.io.File |
getLocalFile()
returns the File that corresponds to the remote file. |
java.lang.String |
getNameExt()
returns the canonical name of the file within the filesystem. |
FileObject |
getParent()
returns the parent FileObject (a folder). |
long |
getSize()
returns the size of the file. |
boolean |
isData()
returns true if the file is a data file that to be used reading or writing data. |
boolean |
isFolder()
indicates the type of FileObject |
boolean |
isLocal()
returns true is the file is locally available, meaning clients can call getFile() and the readble File reference will be available in interactive time. |
boolean |
isReadOnly()
true is the file is read-only. |
boolean |
isRoot()
returns true if this is the root of the filesystem it came from. |
java.util.Date |
lastModified()
returns the Date when the file was last modified. |
java.lang.String |
toString()
|
Methods inherited from class org.das2.util.filesystem.FileObject |
---|
getChannel, getFile, getInputStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected WebFileObject(WebFileSystem wfs, java.lang.String pathname, java.util.Date modifiedDate)
Method Detail |
---|
public boolean canRead()
FileObject
canRead
in class FileObject
public FileObject[] getChildren() throws java.io.IOException
FileObject
getChildren
in class FileObject
java.io.IOException
public java.io.InputStream getInputStream(ProgressMonitor monitor) throws java.io.FileNotFoundException, java.io.IOException
FileObject
getInputStream
in class FileObject
monitor
- for monitoring the download. The monitor won't be used when the access
is immediate, for example with local FileObjects.
java.io.FileNotFoundException
- if the file doesn't exist.
java.io.IOException
public FileObject getParent()
FileObject
getParent
in class FileObject
public long getSize()
FileObject
getSize
in class FileObject
public boolean isData()
FileObject
isData
in class FileObject
public boolean isFolder()
FileObject
isFolder
in class FileObject
public boolean isReadOnly()
FileObject
isReadOnly
in class FileObject
public boolean isRoot()
FileObject
isRoot
in class FileObject
public java.util.Date lastModified()
FileObject
lastModified
in class FileObject
protected java.io.File getLocalFile()
public boolean exists()
FileObject
exists
in class FileObject
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getNameExt()
FileObject
getNameExt
in class FileObject
public java.nio.channels.ReadableByteChannel getChannel(ProgressMonitor monitor) throws java.io.FileNotFoundException, java.io.IOException
getChannel
in class FileObject
monitor
-
java.io.FileNotFoundException
java.io.IOException
public java.io.File getFile(ProgressMonitor monitor) throws java.io.FileNotFoundException, java.io.IOException
FileObject
getFile
in class FileObject
monitor
- for monitoring the download. The monitor won't be used when the access
is immediate, for example with local FileObjects.
java.io.FileNotFoundException
- if the file doesn't exist.
java.io.IOException
- if the file cannot be made localpublic boolean isLocal()
isLocal
in class FileObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |