FileDescriptor

public final class FileDescriptor extends Object

Wraps a Unix file descriptor. It's possible to get the file descriptor used by some classes (such as FileInputStream, FileOutputStream, and RandomAccessFile), and then create new streams that point to the same file descriptor.

Field Summary

public static final FileDescriptor err Corresponds to stderr.
public static final FileDescriptor in Corresponds to stdin.
public static final FileDescriptor out Corresponds to stdout.

Public Constructor Summary

FileDescriptor()
Constructs a new invalid FileDescriptor.

Public Method Summary

void
sync()
Ensures that data which is buffered within the underlying implementation is written out to the appropriate device before returning.
String
boolean
valid()
Tests whether this FileDescriptor is valid.

Inherited Method Summary

Fields

public static final FileDescriptor err

Corresponds to stderr.

public static final FileDescriptor in

Corresponds to stdin.

public static final FileDescriptor out

Corresponds to stdout.

Public Constructors

public FileDescriptor ()

Constructs a new invalid FileDescriptor.

Public Methods

public void sync ()

Ensures that data which is buffered within the underlying implementation is written out to the appropriate device before returning.

public String toString ()

public boolean valid ()

Tests whether this FileDescriptor is valid.