Class URLFileLocation
java.lang.Object
org.fife.ui.rsyntaxtextarea.FileLocation
org.fife.ui.rsyntaxtextarea.URLFileLocation
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringCreates a "prettied-up" URL to use.private StringCreates the "prettied-up" filename to use.protected longReturns the last time this file was modified, orTextEditorPane.LAST_MODIFIED_UNKNOWNif this value cannot be computed (such as for a remote file).Returns the full path to the file.Returns the name of the file.protected InputStreamOpens an input stream for reading from this file.protected OutputStreamOpens an output stream for writing this file.booleanisLocal()Returns whether this file location is a local file.booleanReturns whether this file location is a local file and already exists.Methods inherited from class FileLocation
create, create, create, isRemote
-
Field Details
-
url
URL of the remote file. -
fileFullPath
A prettied-up full path of the URL (password removed, etc.). -
fileName
A prettied-up filename (leading slash, and possibly "%2F", removed).
-
-
Constructor Details
-
URLFileLocation
-
-
Method Details
-
createFileFullPath
Creates a "prettied-up" URL to use. This will be stripped of sensitive information such as passwords.- Returns:
- The full path to use.
-
createFileName
Creates the "prettied-up" filename to use.- Returns:
- The base name of the file of this URL.
-
getActualLastModified
protected long getActualLastModified()Returns the last time this file was modified, orTextEditorPane.LAST_MODIFIED_UNKNOWNif this value cannot be computed (such as for a remote file).- Specified by:
getActualLastModifiedin classFileLocation- Returns:
- The last time this file was modified. This will always be
TextEditorPane.LAST_MODIFIED_UNKNOWNfor URL's.
-
getFileFullPath
Description copied from class:FileLocationReturns the full path to the file. This will be stripped of sensitive information such as passwords for remote files.- Specified by:
getFileFullPathin classFileLocation- Returns:
- The full path to the file.
- See Also:
-
getFileName
Description copied from class:FileLocationReturns the name of the file.- Specified by:
getFileNamein classFileLocation- Returns:
- The name of the file.
- See Also:
-
getInputStream
Description copied from class:FileLocationOpens an input stream for reading from this file.- Specified by:
getInputStreamin classFileLocation- Returns:
- The input stream.
- Throws:
IOException- If the file does not exist, or some other IO error occurs.
-
getOutputStream
Description copied from class:FileLocationOpens an output stream for writing this file.- Specified by:
getOutputStreamin classFileLocation- Returns:
- An output stream.
- Throws:
IOException- If an IO error occurs.
-
isLocal
public boolean isLocal()Returns whether this file location is a local file.- Specified by:
isLocalin classFileLocation- Returns:
- Whether this is a local file.
- See Also:
-
isLocalAndExists
public boolean isLocalAndExists()Returns whether this file location is a local file and already exists. This method always returnsfalsesince we cannot check this value easily.- Specified by:
isLocalAndExistsin classFileLocation- Returns:
falsealways.- See Also:
-