com.ibm.as400.access

Class IFSFileDescriptor

  • All Implemented Interfaces:
    Serializable


    public final class IFSFileDescriptor
    extends Object
    implements Serializable
    Represents an integrated file system file descriptor. Instances of the file descriptor class serve as an opaque handle to the underlying structure representing an open file or an open socket. Applications should not create their own file descriptors.
    Here is an example of two input streams sharing a file descriptor:
        AS400 as400 = new AS400("mySystem");
        IFSFileInputStream is1 = new IFSFileInputStream(as400, "/Dir/File");
        IFSFileInputStream is2 = new IFSFileInputStream(is1.getFD());
    
    Reading in one object advances the current file position of all objects that share the same descriptor.
    See Also:
    IFSFileInputStream.getFD(), IFSFileOutputStream.getFD(), IFSRandomAccessFile.getFD(), Serialized Form
    • Constructor Detail

      • IFSFileDescriptor

        public IFSFileDescriptor()
        Constructs an IFSFileDescriptor object.

    • Method Detail

      • sync

        public void sync()
                  throws IOException
        Force the system buffers to synchronize with the underlying device.
        Throws:
        IOException
      • valid

        public boolean valid()
        Determines if this file descriptor represents an open file.
        Returns:
        true if this file descriptor represents a valid, open file; false otherwise.