|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.ganttproject.document.AbstractDocument | +--net.sourceforge.ganttproject.document.FileDocument
This class implements the interface Document for file access on local file systems.
Constructor Summary | |
FileDocument(java.io.File file)
|
Method Summary | |
boolean |
canRead()
Checks, wether the document is readable. |
boolean |
canWrite()
Checks, wether the document is writable. |
java.lang.String |
getDescription()
Gets the description of the document (can be displayed in the application's titlebar). |
java.lang.String |
getFilePath()
Gets the path to the document, if it is a file on a local file system (can be used to initialize a JFileChooser). |
java.io.InputStream |
getInputStream()
Gets an InputStream, that allows to read from the document. |
java.io.OutputStream |
getOutputStream()
Gets an OutputStream, that allows to write to the document. |
java.lang.String |
getPath()
Gets the path to the document. |
boolean |
isValidForMRU()
Checks, wether the document should appear in the MRU (list of most recently used files). |
Methods inherited from class net.sourceforge.ganttproject.document.AbstractDocument |
acquireLock, equals, getLastError, getPassword, getURLPath, getUsername, releaseLock |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileDocument(java.io.File file)
Method Detail |
public java.lang.String getDescription()
Document
public boolean canRead()
Document
public boolean canWrite()
Document
public boolean isValidForMRU()
Document
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException
Document
java.io.FileNotFoundException
public java.io.OutputStream getOutputStream() throws java.io.FileNotFoundException
Document
java.io.FileNotFoundException
public java.lang.String getPath()
Document
public java.lang.String getFilePath()
Document
getFilePath
in interface Document
getFilePath
in class AbstractDocument
null
, otherwise.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |