Package com.sun.nfs

Class Nfs

  • Direct Known Subclasses:
    Nfs2

    public abstract class Nfs
    extends java.lang.Object
    Container class for an NFS object: either a file or a directory. Herein are common methods that are not version specific. This class holds the file's filehandle, name, and attributes. If a regular file then data may be cached in an XDR buffer. If a directory then the string array for the entries will be cached. There's also a static hash table that's used to cache these Nfs objects.
    Author:
    Brent Callaghan, Ricardo Labiaga
    See Also:
    Nfs2, Nfs3, Buffer
    • Constructor Summary

      Constructors 
      Constructor Description
      Nfs()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the file by flushing data and deallocating buffers.
      protected void finalize()  
      void flush()
      Flush any buffered writes to the file.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Nfs

        public Nfs()
    • Method Detail

      • flush

        public void flush()
                   throws java.io.IOException
        Flush any buffered writes to the file. This must be called after any series of writes to guarantee that the data reach the server.
        Throws:
        java.io.IOException - if writes failed for some reason, e.g. if server ran out of disk space.
      • close

        public void close()
                   throws java.io.IOException
        Close the file by flushing data and deallocating buffers.
        Throws:
        java.io.IOException - if failure during flushing.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object