|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
com.insightful.splus.client.ServerFile
public class ServerFile
Object representing a file on the server, with constructor to specify
information on whether it is a directory.
This was created for use with a JFileChooser. Information on directory
status is stored in the ServerFile to minimize engine queries.
Many methods are not implemented, and throw an
UnsupportedOperationException.
If directory status is not specified in the constructor, it is queried
when isDirectory() is called.
Static booleans are stored indicating whether to check readable, writable,
and exists status, or to just always return true for canRead(), canWrite(),
and canExists(). These were added to suppress unnecessary engine queries
by calls from standard JFileChooser-related classes. They may be set
using setCheckReadable(), setCheckWritable(), setCheckExists().
Field Summary | |
---|---|
static String |
SERVER_ROOT
|
static int |
SERVER_ROOT_LENGTH
|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
ServerFile(File parent,
String child)
Override the default File constructor and set local variables. |
|
ServerFile(File parent,
String child,
boolean isDir)
Constructor where the directory status is specified. |
|
ServerFile(String pathname)
Override the default File constructor and set local variables. |
|
ServerFile(String pathname,
boolean isDir)
Constructor where the directory status is specified. |
|
ServerFile(String parent,
String child)
Override the default File constructor and set local variables. |
|
ServerFile(String parent,
String child,
boolean isDir)
Constructor where the directory status is specified. |
Method Summary | |
---|---|
boolean |
canRead()
|
boolean |
canWrite()
|
int |
compareTo(File pathname)
|
static String |
convertServerFilePath(String filePath)
|
boolean |
createNewFile()
|
static File |
createTempFile(String prefix,
String suffix)
|
static File |
createTempFile(String prefix,
String suffix,
File directory)
|
boolean |
delete()
|
void |
deleteOnExit()
|
boolean |
equals(Object obj)
|
boolean |
exists()
|
File |
getAbsoluteFile()
|
String |
getAbsolutePath()
|
File |
getCanonicalFile()
|
String |
getCanonicalPath()
|
String |
getName()
|
String |
getParent()
|
File |
getParentFile()
|
String |
getPath()
|
int |
hashCode()
|
boolean |
isAbsolute()
|
boolean |
isDirectory()
|
boolean |
isFile()
|
boolean |
isHidden()
|
long |
lastModified()
|
long |
length()
|
String[] |
list()
|
String[] |
list(FilenameFilter filter)
|
File[] |
listFiles()
|
File[] |
listFiles(FileFilter filter)
|
File[] |
listFiles(FilenameFilter filter)
|
static File[] |
listRoots()
|
boolean |
mkdir()
|
boolean |
mkdirs()
|
boolean |
renameTo(File dest)
|
void |
setCanRead(boolean read)
|
void |
setCanWrite(boolean write)
|
static boolean |
setCheckExists(boolean check)
|
static boolean |
setCheckReadable(boolean check)
Method to check whether to do engine queries or just return true. |
static boolean |
setCheckWritable(boolean check)
|
void |
setExists(boolean ex)
|
void |
setIsDir(boolean dir)
|
boolean |
setLastModified(long time)
|
boolean |
setLength(long len)
|
boolean |
setReadOnly()
|
String |
toString()
|
URL |
toURL()
|
Methods inherited from class java.io.File |
---|
toURI |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SERVER_ROOT
public static final int SERVER_ROOT_LENGTH
Constructor Detail |
---|
public ServerFile(String pathname)
public ServerFile(File parent, String child)
public ServerFile(String parent, String child)
public ServerFile(String pathname, boolean isDir)
public ServerFile(File parent, String child, boolean isDir)
public ServerFile(String parent, String child, boolean isDir)
Method Detail |
---|
public static String convertServerFilePath(String filePath)
public void setCanRead(boolean read)
public void setCanWrite(boolean write)
public boolean canRead()
canRead
in class File
public boolean canWrite()
canWrite
in class File
public int compareTo(File pathname)
compareTo
in interface Comparable<File>
compareTo
in class File
public boolean createNewFile()
createNewFile
in class File
public static File createTempFile(String prefix, String suffix)
public static File createTempFile(String prefix, String suffix, File directory)
public boolean delete()
delete
in class File
public void deleteOnExit()
deleteOnExit
in class File
public boolean equals(Object obj)
equals
in class File
public void setExists(boolean ex)
public boolean exists()
exists
in class File
public File getAbsoluteFile()
getAbsoluteFile
in class File
public String getAbsolutePath()
getAbsolutePath
in class File
public File getCanonicalFile()
getCanonicalFile
in class File
public String getCanonicalPath()
getCanonicalPath
in class File
public String getName()
getName
in class File
public String getParent()
getParent
in class File
public File getParentFile()
getParentFile
in class File
public String getPath()
getPath
in class File
public int hashCode()
hashCode
in class File
public boolean isAbsolute()
isAbsolute
in class File
public void setIsDir(boolean dir)
public boolean isDirectory()
isDirectory
in class File
public boolean isFile()
isFile
in class File
public boolean isHidden()
isHidden
in class File
public long lastModified()
lastModified
in class File
public long length()
length
in class File
public String[] list()
list
in class File
public String[] list(FilenameFilter filter)
list
in class File
public File[] listFiles()
listFiles
in class File
public File[] listFiles(FileFilter filter)
listFiles
in class File
public File[] listFiles(FilenameFilter filter)
listFiles
in class File
public static File[] listRoots()
public boolean mkdir()
mkdir
in class File
public boolean mkdirs()
mkdirs
in class File
public boolean renameTo(File dest)
renameTo
in class File
public boolean setLastModified(long time)
setLastModified
in class File
public boolean setLength(long len)
public boolean setReadOnly()
setReadOnly
in class File
public String toString()
toString
in class File
public URL toURL()
toURL
in class File
public static boolean setCheckReadable(boolean check)
check
- indicate whether to actually check the file status
public static boolean setCheckWritable(boolean check)
public static boolean setCheckExists(boolean check)
|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |