Package jadex.base.gui.filechooser
Class RemoteFile
- java.lang.Object
- 
- java.io.File
- 
- jadex.base.gui.filechooser.RemoteFile
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<java.io.File>
 
 public class RemoteFile extends java.io.FileFile wrapper for remote files. Is necessary because JFileChooser works with File objects only.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description RemoteFile(FileData filedata)Create a directory representation of a jar file.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RemoteFile[]convertToFiles(FileData[] remfiles)Convert remote files to files.booleanexists()Check if the file exists.java.lang.StringgetAbsolutePath()Get the path.java.io.FilegetCanonicalFile()Get the canonical name.java.lang.StringgetCanonicalPath()FileDatagetFiledata()Get the filedata.java.lang.StringgetName()Get the file name.java.lang.StringgetParent()Get the parent name.java.io.FilegetParentFile()Get the parent file.java.lang.StringgetPath()Get the path.booleanisAbsolute()Test if absolute.booleanisDirectory()Test if is a directory.booleanisFile()Test if is a file.booleanisHidden()Test if file is hidden.longlastModified()Get the last modified date.java.lang.String[]list()List contained filed.java.io.File[]listFiles()java.io.File[]listFiles(java.io.FileFilter filter)java.io.File[]listFiles(java.io.FilenameFilter filter)static voidmain(java.lang.String[] args)Main for testing.java.lang.StringtoString()Get the string representation.- 
Methods inherited from class java.io.FilecanExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getFreeSpace, getTotalSpace, getUsableSpace, hashCode, length, list, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toURI, toURL
 
- 
 
- 
- 
- 
Field Detail- 
filedataprotected FileData filedata The file data.
 
- 
 - 
Constructor Detail- 
RemoteFilepublic RemoteFile(FileData filedata) Create a directory representation of a jar file.
 
- 
 - 
Method Detail- 
getFiledatapublic FileData getFiledata() Get the filedata.- Returns:
- the filedata.
 
 - 
isDirectorypublic boolean isDirectory() Test if is a directory.- Overrides:
- isDirectoryin class- java.io.File
- Returns:
- True, if directory.
 
 - 
listFilespublic java.io.File[] listFiles(java.io.FileFilter filter) - Overrides:
- listFilesin class- java.io.File
 
 - 
listFilespublic java.io.File[] listFiles(java.io.FilenameFilter filter) - Overrides:
- listFilesin class- java.io.File
 
 - 
listFilespublic java.io.File[] listFiles() - Overrides:
- listFilesin class- java.io.File
 
 - 
lastModifiedpublic long lastModified() Get the last modified date.- Overrides:
- lastModifiedin class- java.io.File
 
 - 
existspublic boolean exists() Check if the file exists.- Overrides:
- existsin class- java.io.File
 
 - 
getNamepublic java.lang.String getName() Get the file name.- Overrides:
- getNamein class- java.io.File
- Returns:
- The file name.
 
 - 
getAbsolutePathpublic java.lang.String getAbsolutePath() Get the path.- Overrides:
- getAbsolutePathin class- java.io.File
 
 - 
getPathpublic java.lang.String getPath() Get the path.- Overrides:
- getPathin class- java.io.File
 
 - 
getParentpublic java.lang.String getParent() Get the parent name.- Overrides:
- getParentin class- java.io.File
- Returns:
- The parent name.
 
 - 
getParentFilepublic java.io.File getParentFile() Get the parent file.- Overrides:
- getParentFilein class- java.io.File
 
 - 
isAbsolutepublic boolean isAbsolute() Test if absolute.- Overrides:
- isAbsolutein class- java.io.File
- Returns:
- Treu, if absolute.
 
 - 
getCanonicalPathpublic java.lang.String getCanonicalPath() throws java.io.IOException- Overrides:
- getCanonicalPathin class- java.io.File
- Throws:
- java.io.IOException
 
 - 
getCanonicalFilepublic java.io.File getCanonicalFile() throws java.io.IOExceptionGet the canonical name. Needs to return this because JFileCooser uses this method to check isTraverable(), i.e. if a dir can be looked into. Hence, the dir property must be kept in returned file.- Overrides:
- getCanonicalFilein class- java.io.File
- Throws:
- java.io.IOException
 
 - 
isFilepublic boolean isFile() Test if is a file.- Overrides:
- isFilein class- java.io.File
- Returns:
- True, if is a file.
 
 - 
isHiddenpublic boolean isHidden() Test if file is hidden.- Overrides:
- isHiddenin class- java.io.File
- Returns:
- True, if hidden.
 
 - 
listpublic java.lang.String[] list() List contained filed. JFileChooser uses the FileSystemView.- Overrides:
- listin class- java.io.File
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.io.File
- Returns:
- The string representation.
 
 - 
convertToFilespublic static RemoteFile[] convertToFiles(FileData[] remfiles) Convert remote files to files.
 - 
mainpublic static void main(java.lang.String[] args) throws java.lang.ExceptionMain for testing.- Throws:
- java.lang.Exception
 
 
- 
 
-