|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.FileDescriptor
public final class 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. |
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. |
Method Summary | |
---|---|
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 |
---|
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()
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.
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.