public abstract class FileLocation
extends java.lang.Object
| Constructor and Description |
|---|
FileLocation() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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()