public final class FileDescriptor extends Object
FileInputStream
or FileOutputStream
to
contain it.
Applications should not create their own file descriptors.
FileInputStream
,
FileOutputStream
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
FileDescriptor()
Constructs an (invalid) FileDescriptor
object.
|
Modifier and Type | Method and Description |
---|---|
void |
sync()
Force all system buffers to synchronize with the underlying
device.
|
boolean |
valid()
Tests if this file descriptor object is valid.
|
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
public FileDescriptor()
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. Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.