PPT Slide
Example #1 - Using Streams Interface
import sunsoft.onc.WebNFS.*;
// create connection to host
URL url = new URL( "nfs://www.sun.com/tmp/file.txt");
File nfile = new File(url)
System.out.println("file is file");
if ( nfile.isDirectory() ) {
System.out.println("file is directory");
// create file input stream
FileInputStream nfis = null;
nfis = new FileInputStream(nfile);
for ( int count =0; ; count++ ) {
int val = (byte) nfis.read();
System.out.println("read " + count + " bytes ");