All About Class FileDescriptor in Java

0
25
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share


An instance of the FileDescriptor class serves as an opaque (not visible on top) handle to the underlying machine specific structure representing an open file or an open socket.Applications should not create their own FileDescriptor .
The structure of the class FileDescriptor  is given as:


public final class java.io.FileDescriptor extends java.lang.Object{
//member elements
public final static FileDescriptor err;
//handles the standard error stream
public final static FileDescriptor in;
//handles the standard input stream
public final static FileDescriptor out;
//handles the standard output stream
//constructor
public FileDescriptor()//creates a default FileDescriptor object
//methods:
public boolean valid();
//this method returns true if the file descriptor object represents a valid,open file or socket.
//false otherwise.
}
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here