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 | 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 | Description |
|---|---|
FileDescriptor () |
Constructs an (invalid) FileDescriptor
object.
|
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, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Scripting on this page tracks web page traffic, but does not change the content in any way.