This section describes the additional methods that are not currently part of the java.io classes. For example, the first entry, called XFile, describes the methods that are in the com.sun.xfile.XFile class but not in the java.io.File class. All com.sun.xfile classes that have a counterpart in the java.io classes are generally a superset of the java.io classes in the methods provided, not including constructors. File descriptors are not supported and constructors that use a java.io.File* class now use a com.sun.xfile.XFile* class. Also shown are the few new interfaces and classes defined by the extended filesystem. A complete description of the API can be found in the XFile javadoc files included in the release.
Table 2-2 XFile Classes
Classes |
java.io.File Equivalent |
Methods |
---|---|---|
XFile |
java.io.File |
public XFile(String url) - class constructor public XFile(XFile dir, String relurl) - class constructor |
XFileOutputStream |
FileOutputStream |
public XFileOutputStream(XFile file) - class constructor |
XFileInputStream |
FileInputStream |
public XFileInputStream(XFile file) - class constructor |
XRandomAccessFile |
RandomAccessFile |
public XRandomAccessFile(XFile file, String mode) -class constructor |
XFilenameFilter |
FilenameFilter |
public abstract boolean accept(XFile dir, String name) - filter based on file spec |
XFileReader |
FileReader |
XFileReader(XFile file) |
XFileWriter |
FileWriter |
XFileWriter(XFile file, String access) |