The Java.io.FileDescriptor class instances serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes. Following are the important points about FileDescriptor −
The main practical use for a file descriptor is to create a FileInputStream or FileOutputStream to contain it.
Applications should not create their own file descriptors.
Following is the declaration for Java.io.FileDescriptor class −
public final class FileDescriptor extends Object
Following are the fields for Java.io.FileDescriptor class −
static FileDescriptor err − This is the handle to the standard error stream.
static FileDescriptor in − This is the handle to the standard input stream.
static FileDescriptor out − This is the handle to the standard output stream.
Sr.No. | Constructor & Description |
---|---|
1 | FileDescriptor() This method constructs an (invalid) FileDescriptor object. |
Sr.No. | Method & Description |
---|---|
1 | void sync()
This method force all system buffers to synchronize with the underlying device. |
2 | boolean valid()
This method tests if this file descriptor object is valid. |
This class inherits methods from the following classes −