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.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
err | FileDescriptor representing standard error. | ||||||||||
in | The FileDescriptor representing standard input. | ||||||||||
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.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
| |||||||||||
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. |
---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful toString
method
if you intend implementing your own toString
method.
Indicates whether this FileDescriptor is valid.
true
if this FileDescriptor is valid, false
otherwise.