Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.io

Class FileDescriptor

java.lang.Object
|
+--java.io.FileDescriptor


public final class FileDescriptor

extends Object

This class represents an opaque file handle as a Java class. It should be used only to pass to other methods that expect an object of this type. No system specific information can be obtained from this object.

Author:

Field Summary

static java.io.FileDescriptorerr

This is a FileDescriptor object representing the standard error stream.
static java.io.FileDescriptorin

This is a FileDescriptor object representing the standard input stream.
static java.io.FileDescriptorout

This is a FileDescriptor object representing the standard output stream.

Constructor Summary

FileDescriptor()

This method is used to initialize an invalid FileDescriptor object.

Method Summary

voidsync()

This method forces all data that has not yet been physically written to the underlying storage medium associated with this FileDescriptor to be written out.
booleanvalid()

This methods tests whether or not this object represents a valid open native file handle.

Field Details

err

public static final FileDescriptor err

This is a FileDescriptor object representing the standard error stream.


in

public static final FileDescriptor in

This is a FileDescriptor object representing the standard input stream.


out

public static final FileDescriptor out

This is a FileDescriptor object representing the standard output stream.


Constructor Details

FileDescriptor

public FileDescriptor()

This method is used to initialize an invalid FileDescriptor object.


Method Details

sync

public void sync()

This method forces all data that has not yet been physically written to the underlying storage medium associated with this FileDescriptor to be written out. This method will not return until all data has been fully written to the underlying device. If the device does not support this functionality or if an error occurs, then an exception will be thrown.


valid

public boolean valid()

This methods tests whether or not this object represents a valid open native file handle.

Returns: