Class IFSFileDescriptor

  • All Implemented Interfaces:

    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.
      • valid

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