|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.FileDescriptor
Instances of the file descriptor class serve as an opaque handle
to the underlying machine-specific structure representing an open
file, an open socket, or another source or sink of bytes. The
main practical use for a file descriptor is to create a
FileInputStream
or FileOutputStream
to
contain it.
Applications should not create their own file descriptors.
FileInputStream
,
FileOutputStream
Field Summary | |
static FileDescriptor |
err
A handle to the standard error stream. |
private int |
fd
|
static FileDescriptor |
in
A handle to the standard input stream. |
static FileDescriptor |
out
A handle to the standard output stream. |
Constructor Summary | |
|
FileDescriptor()
Constructs an (invalid) FileDescriptor object. |
private |
FileDescriptor(int fd)
|
Method Summary | |
private static void |
initIDs()
|
void |
sync()
Force all system buffers to synchronize with the underlying device. |
boolean |
valid()
Tests if this file descriptor object is valid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int fd
public static final FileDescriptor in
System.in
.
System.in
public static final FileDescriptor out
System.out
.
System.out
public static final FileDescriptor err
System.err
.
System.err
Constructor Detail |
public FileDescriptor()
private FileDescriptor(int fd)
Method Detail |
public boolean valid()
true
if the file descriptor object represents a
valid, open file, socket, or other active I/O connection;
false
otherwise.public void sync() throws SyncFailedException
SyncFailedException
- Thrown when the buffers cannot be flushed,
or because the system cannot guarantee that all the
buffers have been synchronized with physical media.private static void initIDs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |