|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fife.ui.rsyntaxtextarea.FileLocation
public abstract class FileLocation
Holds the location of a local or remote file. This provides a common way to read, write, and check properties of both local and remote files.
Constructor Summary | |
---|---|
FileLocation()
|
Method Summary | |
---|---|
static FileLocation |
create(java.io.File file)
Creates a FileLocation instance for the specified local file. |
static FileLocation |
create(java.lang.String fileFullPath)
Creates a FileLocation instance for the specified local file. |
static FileLocation |
create(java.net.URL url)
Creates a FileLocation instance for the specified file. |
protected abstract long |
getActualLastModified()
Returns the last time this file was modified, or TextEditorPane.LAST_MODIFIED_UNKNOWN if this value cannot be
computed (such as for a remote file). |
abstract java.lang.String |
getFileFullPath()
Returns the full path to the file. |
abstract java.lang.String |
getFileName()
Returns the name of the file. |
protected abstract java.io.InputStream |
getInputStream()
Opens an input stream for reading from this file. |
protected abstract java.io.OutputStream |
getOutputStream()
Opens an output stream for writing this file. |
abstract boolean |
isLocal()
Returns whether this file location is a local file. |
abstract boolean |
isLocalAndExists()
Returns whether this file location is a local file that already exists. |
boolean |
isRemote()
Returns whether this file location is a remote location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileLocation()
Method Detail |
---|
public static FileLocation create(java.lang.String fileFullPath)
FileLocation
instance for the specified local file.
fileFullPath
- The full path to a local file.
public static FileLocation create(java.io.File file)
FileLocation
instance for the specified local file.
file
- A local file.
public static FileLocation create(java.net.URL url)
FileLocation
instance for the specified file.
url
- The URL of a file.
protected abstract long getActualLastModified()
TextEditorPane.LAST_MODIFIED_UNKNOWN
if this value cannot be
computed (such as for a remote file).
public abstract java.lang.String getFileFullPath()
getFileName()
public abstract java.lang.String getFileName()
getFileFullPath()
protected abstract java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
- If the file does not exist, or some other IO error
occurs.protected abstract java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
- If an IO error occurs.public abstract boolean isLocal()
isLocalAndExists()
public abstract boolean isLocalAndExists()
isLocal()
public boolean isRemote()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |