java.io.FileDescriptor
java.lang.Object
None
None
JDK 1.0 or later
The FileDescriptor class encapsulates system-specific handles for files and sockets. Instances of this class can be properly constructed only by native methods of other classes. In other words, you should not be constructing your own file descriptors. Currently, file descriptors are returned by the following methods:
A file descriptor can be used in the constructors for FileInputStream, FileOutputStream, FileReader, and FileWriter.
public final class java.io.FileDescriptor extends java.lang.Object { // Constants public final static FileDescriptor err; public final static FileDescriptor in; public final static FileDescriptor out; // Instance Methods public native void sync(); // New in 1.1 public native boolean valid(); }
The file descriptor for standard error. See System.err, which is constructed from this constant.
The file descriptor for standard input. See System.in, which is constructed from this constant.
The file descriptor for standard output. See System.out, which is constructed from this constant.
New as of JDK 1.1
If synchronization cannot be accomplished.
This method causes the underlying device to be updated to a current state, which typically involves asking the operating system to flush its buffer. For example, if this FileDescriptor refers to a file on a physical disk, the disk is physically updated to reflect the current state of the object this descriptor represents. This method allows an application to put a device in a known state, which could be useful for transaction processing.
true if the FileDescriptor represents a valid, open device; false otherwise.
This method returns a boolean value that indicates the validity of the file descriptor.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
FileInputStream, FileOutputStream, FileReader, FileWriter, SyncFailedException, System
This HTML Help has been published using the chm2web software. |