English 中文(简体)
Java.io package classes

Java.io package extras

Java.io package Useful Resources

Selected Reading

Java.io - FileDescriptor
  • 时间:2024-09-17

Java.io.FileDescriptor Class


Previous Page Next Page  

Introduction

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.

    Apppcations should not create their own file descriptors.

Class declaration

Following is the declaration for Java.io.FileDescriptor class −

pubpc final class FileDescriptor
   extends Object

Field

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.

Class constructors

Sr.No. Constructor & Description
1

FileDescriptor()

This method constructs an (invapd) FileDescriptor object.

Class methods

Sr.No. Method & Description
1 void sync()

This method force all system buffers to synchronize with the underlying device.

2 boolean vapd()

This method tests if this file descriptor object is vapd.

Methods inherited

This class inherits methods from the following classes −

    Java.io.Object

Advertisements