public final class FileDescriptor extends Object
FileInputStream, FileOutputStream,
and RandomAccessFile), and then create new streams that point to the same
file descriptor.| Modifier and Type | Field and Description |
|---|---|
static FileDescriptor |
err
Corresponds to
stderr. |
static FileDescriptor |
in
Corresponds to
stdin. |
static FileDescriptor |
out
Corresponds to
stdout. |
| Constructor and Description |
|---|
FileDescriptor()
Constructs a new invalid FileDescriptor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInt$()
Returns the int fd.
|
boolean |
isSocket$() |
void |
setInt$(int fd)
Sets the int fd.
|
void |
sync()
Ensures that data which is buffered within the underlying implementation
is written out to the appropriate device before returning.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
boolean |
valid()
Tests whether this
FileDescriptor is valid. |
public static final FileDescriptor in
stdin.public static final FileDescriptor out
stdout.public static final FileDescriptor err
stderr.public void sync()
throws SyncFailedException
SyncFailedExceptionpublic boolean valid()
FileDescriptor is valid.public final int getInt$()
public final void setInt$(int fd)
public final boolean isSocket$()
public String toString()
ObjectgetClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString method
if you intend implementing your own toString method.