| Package | Description | 
|---|---|
| java.io | Provides for system input and output through data streams,
serialization and the file system. | 
| java.lang | Provides classes that are fundamental to the design of the Java
 programming language. | 
| java.net | Provides the classes for implementing networking applications. | 
| Modifier and Type | Field and Description | 
|---|---|
| static FileDescriptor | FileDescriptor. errA handle to the standard error stream. | 
| static FileDescriptor | FileDescriptor. inA handle to the standard input stream. | 
| static FileDescriptor | FileDescriptor. outA handle to the standard output stream. | 
| Modifier and Type | Method and Description | 
|---|---|
| FileDescriptor | FileOutputStream. getFD()Returns the file descriptor associated with this stream. | 
| FileDescriptor | FileInputStream. getFD()Returns the  FileDescriptorobject  that represents the connection to
 the actual file in the file system being
 used by thisFileInputStream. | 
| FileDescriptor | RandomAccessFile. getFD()Returns the opaque file descriptor object associated with this
 stream. | 
| Constructor and Description | 
|---|
| FileInputStream(FileDescriptor fdObj)Creates a  FileInputStreamby using the file descriptorfdObj, which represents an existing connection to an
 actual file in the file system. | 
| FileOutputStream(FileDescriptor fdObj)Creates a file output stream to write to the specified file
 descriptor, which represents an existing connection to an actual
 file in the file system. | 
| FileReader(FileDescriptor fd)Creates a new FileReader, given the
 FileDescriptor to read from. | 
| FileWriter(FileDescriptor fd)Constructs a FileWriter object associated with a file descriptor. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | SecurityManager. checkRead(FileDescriptor fd)Throws a  SecurityExceptionif the
 calling thread is not allowed to read from the specified file
 descriptor. | 
| void | SecurityManager. checkWrite(FileDescriptor fd)Throws a  SecurityExceptionif the
 calling thread is not allowed to write to the specified file
 descriptor. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected FileDescriptor | DatagramSocketImpl. fdThe file descriptor object. | 
| protected FileDescriptor | SocketImpl. fdThe file descriptor object for this socket. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected FileDescriptor | DatagramSocketImpl. getFileDescriptor()Gets the datagram socket file descriptor. | 
| protected FileDescriptor | SocketImpl. getFileDescriptor()Returns the value of this socket's  fdfield. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.