public final class FileDescriptor extends Object
| Modifier and Type | Field and Description |
|---|---|
static FileDescriptor |
err
A
FileDescriptor representing the system standard error
stream. |
static FileDescriptor |
in
A
FileDescriptor representing the system standard input
stream. |
static FileDescriptor |
out
A
FileDescriptor representing the system standard output
stream. |
| Constructor and Description |
|---|
FileDescriptor()
This method is used to initialize an invalid FileDescriptor object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
sync()
This method forces all data that has not yet been physically written to
the underlying storage medium associated with this
FileDescriptor
to be written out. |
boolean |
valid()
This methods tests whether or not this object represents a valid open
native file handle.
|
public static final FileDescriptor in
FileDescriptor representing the system standard input
stream. This will usually be accessed through the
System.invariable.public static final FileDescriptor out
FileDescriptor representing the system standard output
stream. This will usually be accessed through the
System.outvariable.public static final FileDescriptor err
FileDescriptor representing the system standard error
stream. This will usually be accessed through the
System.errvariable.public FileDescriptor()
public void sync() throws SyncFailedException
FileDescriptor
to be written out. This method will not return until all data has
been fully written to the underlying device. If the device does not
support this functionality or if an error occurs, then an exception
will be thrown.SyncFailedExceptionpublic boolean valid()
true if this object represents a valid
native file handle, false otherwise