WebNFS Developer's Guide

Chapter 1 Introduction to the WebNFS Software Development Kit

There is much demand for distributed filesystem protocols, such as the WebNFSTM protocol. In particular, experienced JavaTM application developers want to be able to access all files on the Internet in the same way. The WebNFS Software Development Kit (WebNFS SDK) includes Java class libraries that provide a way to access files using the same API for local and remote file access.

SDK Features

The SDK is composed of

NFS Classes

The WebNFS classes make it possible to establish connections to an NFSTM version 2 or version 3 server, using either TCP or UDP. These classes also provide consistent naming with NFS URLs. Further information about these classes can be found in Chapter 3, NFS Classes for the Extended Filesystem and in the WebNFS classes javadoc files included with this release.

The Extended Filesystem API

The Extended Filesystem (XFile) API classes provide a common interface for accessing files of various filesystem types. The classes also allow for dynamic loading of filesystem implementations. The XFile API also provides a means to access file- and filesystem-specific information. Further information about these classes can be found in Chapter 2, Extended Filesystem API, and the XFile javadoc files included with this release.

Using the Extended Filesystem API

The XFile API includes classes similar to java.io.*'s, which have been extended to include file access. For example, there are equivalents to java.io's FileInputStream and FileWriter classes, among others, so that using the XFile classes is generally similar to using classes in java.io. Additionally, the XFile class supports accessing files through URLs, as specified by the NFS URL Scheme.

Sample code showing how to use the XFile API is included with this release.

The XFileChooser Bean

The XFileChooser (WebNFS) Bean API classes provide a high-level component in which users can easily incorporate into their design. The XFileChooser extends an existing Bean provided in JDK 1.2 (JFileChooser) to support access to remote files via the XFile API. Thus the actual code of the WebNFS bean will combine the functionality of the GUI component part of the JFileChooser and the XFile API. For more information, see the Chapter 5, XFileChooser and the javadocs for the XFileChooser which are included with this release.

Using the XFileChooser API

The XFileChooser API provides methods that allow users to get the XFile object of a selected file. It inherits most of the properties from the JFileChooser and thus methods that are public to JFileChooser are available for XFileChooser.

Technical References