CHAPTER 22: The Package java.io Previous
Previous
Java Language
Java Language
Index
Index
Next
Next

22.26 The Class java.io.FileDescriptor

22.26.1 in , 22.26.2 out , 22.26.3 err , 22.26.4 valid

A FileDescriptor is an opaque representation of a connection to an actual file in a file system, or to a network socket, or to another source or sink of bytes. The main practical use for a file descriptor is to create a FileInputStream (S22.4.3) or FileOutputStream (S22.16.3) to contain it.

public final class FileDescriptor {
	public static final FileDescriptor in = ...;
	public static final FileDescriptor out = ...;
	public static final FileDescriptor err = ...;
	public boolean valid();
}


22.26.1 in

public static final FileDescriptor in = ...

A file descriptor for the standard input stream. Usually, this file descriptor is not used directly, but rather the input stream known as System.in (S20.18.1).


22.26.2 out

public static final FileDescriptor out = ...

A file descriptor for the standard output stream. Usually, this file descriptor is not used directly, but rather the output stream known as System.out (S20.18.2).


22.26.3 err

public static final FileDescriptor err = ...

A file descriptor for the standard error output stream. Usually, this file descriptor is not used directly, but rather the output stream known as System.err (S20.18.3).


22.26.4 valid

public boolean valid()

If this FileDescriptor is valid (represents an active connection to a file or other active I/O connection), then the result is true. Otherwise, the result is false.

Top© 1996 Sun Microsystems, Inc. All rights reserved.