<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.FileDescriptor
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.File.html#_top_">Previous</a>  <a href="java.io.FileInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.FileDescriptor
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.io.FileDescriptor
</pre>
<hr>
<dl>
  <dt> public final class <b>FileDescriptor</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
</dl>
Instances of the file descriptor class serve as an opaque handle 
 to the underlying machine-specific structure representing an open 
 file or an open socket. 
 <p>
 Applications should not create their own file descriptors.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.FileInputStream.html#_top_">FileInputStream</a>, <a href="java.io.FileOutputStream.html#_top_">FileOutputStream</a>, SocketInputStream, SocketOutputStream
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#err"><b>err</b></a>
  <dd>  A handle to the standard error stream.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#in"><b>in</b></a>
  <dd>  A handle to the standard input stream.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#out"><b>out</b></a>
  <dd>  A handle to the standard output stream.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FileDescriptor()"><b>FileDescriptor</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#sync()"><b>sync</b></a>()
  <dd>  Force all system buffers to synchronize with the underlying
 device.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valid()"><b>valid</b></a>()
  <dd>  Tests if this file descriptor object is valid.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="in"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>in</b>
<pre>
 public static final <a href="#_top_">FileDescriptor</a> in
</pre>
<dl>
  <dd> A handle to the standard input stream.<p>
</dl>
<a name="out"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>out</b>
<pre>
 public static final <a href="#_top_">FileDescriptor</a> out
</pre>
<dl>
  <dd> A handle to the standard output stream.<p>
</dl>
<a name="err"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>err</b>
<pre>
 public static final <a href="#_top_">FileDescriptor</a> err
</pre>
<dl>
  <dd> A handle to the standard error stream.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="FileDescriptor"></a>
<a name="FileDescriptor()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileDescriptor</b>
<pre>
 public FileDescriptor()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="valid()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valid"><b>valid</b></a>
<pre>
 public native boolean valid()
</pre>
<dl>
  <dd> Tests if this file descriptor object is valid.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the file descriptor object represents a
          valid, open file or socket; <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="sync()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="sync"><b>sync</b></a>
<pre>
 public native void sync() throws <a href="java.io.SyncFailedException.html#_top_">SyncFailedException</a>
</pre>
<dl>
  <dd> Force all system buffers to synchronize with the underlying
 device.  This method returns after all modified data and
 attributes of this FileDescriptor have been written to the
 relevant device(s).  In particular, if this FileDescriptor
 refers to a physical storage medium, such as a file in a file
 system, sync will not return until all in-memory modified copies
 of buffers associated with this FileDesecriptor have been
 written to the physical medium.
 sync is meant to be used by code that requires physical
 storage (such as a file) to be in a known state  For
 example, a class that provided a simple transaction facility
 might use sync to ensure that all changes to a file caused
 by a given transaction were recorded on a storage medium.
 sync only affects buffers downstream of this FileDescriptor.  If
 any in-memory buffering is being done by the application (for
 example, by a BufferedOutputStream object), those buffers must
 be flushed into the FileDescriptor (for example, by invoking
 OutputStream.flush) before that data will be affected by sync.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.SyncFailedException.html#_top_">SyncFailedException</a>
    <dd> Thrown when the buffers cannot be flushed,
	      or because the system cannot guarantee that all the
	      buffers have been synchronized with physical media.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.File.html#_top_">Previous</a>  <a href="java.io.FileInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
