java.lang.Object | |
↳ | java.io.FileDescriptor |
The lowest-level representation of a file, device, or socket. If is often used for wrapping an operating system "handle". Some I/O classes can be queried for the FileDescriptor they are operating on, and this descriptor can subsequently be used during the instantiation of another I/O class, so that the new object will reuse it.
The FileDescriptor class also contains static fields representing the system's standard input, output and error streams. These can be used directly if desired, but it is recommended to go through System.in, System.out, and System.err streams respectively.
Applications should not create new FileDescriptors.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FileDescriptor | err | FileDescriptor representing standard error. | |||||||||
FileDescriptor | in | The FileDescriptor representing standard input. | |||||||||
FileDescriptor | out | FileDescriptor representing standard out. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new FileDescriptor containing an invalid handle.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Ensures that data which is buffered within the underlying implementation
is written out to the appropriate device before returning.
| |||||||||||
Indicates whether this FileDescriptor is valid.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
FileDescriptor representing standard error.
The FileDescriptor representing standard input.
Constructs a new FileDescriptor containing an invalid handle. The contained handle is usually modified by native code at a later point.
Ensures that data which is buffered within the underlying implementation is written out to the appropriate device before returning.
SyncFailedException | when the operation fails. |
---|
Indicates whether this FileDescriptor is valid.
true
if this FileDescriptor is valid, false
otherwise.