|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.FileDescriptor
public final class FileDescriptor
FileDescriptor is the lowest level representation of a File, Device, or Socket. You can create any of the IO classes which take a FileDescriptor as an argument by querying an open Socket or File for the FileDescriptor.
The FileDescriptor class also contains static fields representing Standard Input, Output and Error. You can use these directly if desired but it is recommended you go through System.in, System.out, and System.err streams respectively.
Applications should not create new FileDescriptors.
FileInputStream.getFD(),
FileOutputStream.getFD(),
RandomAccessFile.getFD()| Field Summary | |
|---|---|
static FileDescriptor |
err
FileDescriptor representing Standard Error |
static FileDescriptor |
in
FileDescriptor representing Standard In |
static FileDescriptor |
out
FileDescriptor representing Standard Out |
| Constructor Summary | |
|---|---|
FileDescriptor()
Constructs a new FileDescriptor containing an invalid handle. |
|
| Method Summary | |
|---|---|
void |
sync()
Ensures that data which is buffered within the underlying implementation is written out to the appropriate device before returning. |
boolean |
valid()
Answers a boolean indicating whether or not this FileDescriptor is valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final FileDescriptor in
public static final FileDescriptor out
public static final FileDescriptor err
| Constructor Detail |
|---|
public FileDescriptor()
| Method Detail |
|---|
public void sync()
throws SyncFailedException
SyncFailedException - when the operation failspublic boolean valid()
true if this FileDescriptor is valid, false otherwise
|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||