Package org.fife.ui.rsyntaxtextarea
Class FileFileLocation
- java.lang.Object
-
- org.fife.ui.rsyntaxtextarea.FileLocation
-
- org.fife.ui.rsyntaxtextarea.FileFileLocation
-
class FileFileLocation extends FileLocation
The location of a local file.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
file
The file.
-
Constructor Summary
Constructors Constructor Description FileFileLocation(java.io.File file)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getActualLastModified()
Returns the last time this file was modified, orTextEditorPane.LAST_MODIFIED_UNKNOWN
if this value cannot be computed (such as for a remote file).java.lang.String
getFileFullPath()
Returns the full path to the file.java.lang.String
getFileName()
Returns the name of the file.protected java.io.InputStream
getInputStream()
Opens an input stream for reading from this file.protected java.io.OutputStream
getOutputStream()
Opens an output stream for writing this file.boolean
isLocal()
Always returnstrue
.boolean
isLocalAndExists()
Since file locations of this type are guaranteed to be local, this method returns whether the file exists.-
Methods inherited from class org.fife.ui.rsyntaxtextarea.FileLocation
create, create, create, isRemote
-
-
-
-
Method Detail
-
getActualLastModified
protected long getActualLastModified()
Description copied from class:FileLocation
Returns the last time this file was modified, orTextEditorPane.LAST_MODIFIED_UNKNOWN
if this value cannot be computed (such as for a remote file).- Specified by:
getActualLastModified
in classFileLocation
- Returns:
- The last time this file was modified.
-
getFileFullPath
public java.lang.String getFileFullPath()
Returns the full path to the file.- Specified by:
getFileFullPath
in classFileLocation
- Returns:
- The full path to the file.
- See Also:
getFileName()
-
getFileName
public java.lang.String getFileName()
Description copied from class:FileLocation
Returns the name of the file.- Specified by:
getFileName
in classFileLocation
- Returns:
- The name of the file.
- See Also:
FileLocation.getFileFullPath()
-
getInputStream
protected java.io.InputStream getInputStream() throws java.io.IOException
Description copied from class:FileLocation
Opens an input stream for reading from this file.- Specified by:
getInputStream
in classFileLocation
- Returns:
- The input stream.
- Throws:
java.io.IOException
- If the file does not exist, or some other IO error occurs.
-
getOutputStream
protected java.io.OutputStream getOutputStream() throws java.io.IOException
Description copied from class:FileLocation
Opens an output stream for writing this file.- Specified by:
getOutputStream
in classFileLocation
- Returns:
- An output stream.
- Throws:
java.io.IOException
- If an IO error occurs.
-
isLocal
public boolean isLocal()
Always returnstrue
.- Specified by:
isLocal
in classFileLocation
- Returns:
true
always.- See Also:
isLocalAndExists()
-
isLocalAndExists
public boolean isLocalAndExists()
Since file locations of this type are guaranteed to be local, this method returns whether the file exists.- Specified by:
isLocalAndExists
in classFileLocation
- Returns:
- Whether this local file actually exists.
- See Also:
isLocal()
-
-