<!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.FileInputStream
</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.FileDescriptor.html#_top_">Previous</a>  <a href="java.io.FileOutputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.FileInputStream
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.InputStream.html#_top_">java.io.InputStream</a>
           |
           +----java.io.FileInputStream
</pre>
<hr>
<dl>
  <dt> public class <b>FileInputStream</b>
  <dt> extends <a href="java.io.InputStream.html#_top_">InputStream</a>
</dl>
A file input stream is an input stream for reading data from a 
 <code>File</code> or from a <code>FileDescriptor</code>.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.File.html#_top_">File</a>, <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a>, <a href="java.io.FileOutputStream.html#_top_">FileOutputStream</a>
</dl>
<hr>
<a name="index"></a>
<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="#FileInputStream(java.io.File)"><b>FileInputStream</b></a>(File)
  <dd>  Creates an input file stream to read from the specified 
 <code>File</code> object.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FileInputStream(java.io.FileDescriptor)"><b>FileInputStream</b></a>(FileDescriptor)
  <dd>  Creates an input file stream to read from the specified file descriptor.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#FileInputStream(java.lang.String)"><b>FileInputStream</b></a>(String)
  <dd>  Creates an input file stream to read from a file with the 
 specified name.
</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="#available()"><b>available</b></a>()
  <dd>  Returns the number of bytes that can be read from this file input
 stream without blocking.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#close()"><b>close</b></a>()
  <dd>  Closes this file input stream and releases any system resources 
 associated with the stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#finalize()"><b>finalize</b></a>()
  <dd>  Ensures that the <code>close</code> method of this file input stream is
 called when there are no more references to it.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFD()"><b>getFD</b></a>()
  <dd>  Returns the opaque file descriptor object associated with this stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read()"><b>read</b></a>()
  <dd>  Reads a byte of data from this input stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(byte[])"><b>read</b></a>(byte[])
  <dd>  Reads up to <code>b.length</code> bytes of data from this input 
 stream into an array of bytes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(byte[], int, int)"><b>read</b></a>(byte[], int, int)
  <dd>  Reads up to <code>len</code> bytes of data from this input stream 
 into an array of bytes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#skip(long)"><b>skip</b></a>(long)
  <dd>  Skips over and discards <code>n</code> bytes of data from the 
 input stream.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="FileInputStream"></a>
<a name="FileInputStream(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileInputStream</b>
<pre>
 public FileInputStream(<a href="java.lang.String.html#_top_">String</a> name) throws <a href="java.io.FileNotFoundException.html#_top_">FileNotFoundException</a>
</pre>
<dl>
  <dd> Creates an input file stream to read from a file with the 
 specified name.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> name - the system-dependent file name.
    <dt> <b>Throws:</b> <a href="java.io.FileNotFoundException.html#_top_">FileNotFoundException</a>
    <dd> if the file is not found.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the name
               argument to see if the application is allowed read access
               to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="FileInputStream(java.io.File)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileInputStream</b>
<pre>
 public FileInputStream(<a href="java.io.File.html#_top_">File</a> file) throws <a href="java.io.FileNotFoundException.html#_top_">FileNotFoundException</a>
</pre>
<dl>
  <dd> Creates an input file stream to read from the specified 
 <code>File</code> object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> file - the file to be opened for reading.
    <dt> <b>Throws:</b> <a href="java.io.FileNotFoundException.html#_top_">FileNotFoundException</a>
    <dd> if the file is not found.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of this <code>File</code> argument to see if the
               application is allowed read access to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.File.html#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="FileInputStream(java.io.FileDescriptor)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>FileInputStream</b>
<pre>
 public FileInputStream(<a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a> fdObj)
</pre>
<dl>
  <dd> Creates an input file stream to read from the specified file descriptor.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> fdObj - the file descriptor to be opened for reading.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the file
               descriptor to see if the application is allowed to read
               from the specified file descriptor.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.SecurityManager.html#checkRead(java.io.FileDescriptor)">checkRead</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="read()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public native int read() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a byte of data from this input stream. This method blocks 
 if no input is yet available.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next byte of data, or <code>-1</code> if the end of the
             file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#read()">read</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="read(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(byte b[]) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads up to <code>b.length</code> bytes of data from this input 
 stream into an array of bytes. This method blocks until some input 
 is available.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read.
    <dt> <b>Returns:</b>
    <dd> the total number of bytes read into the buffer, or
             <code>-1</code> if there is no more data because the end of
             the file has been reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#read(byte[])">read</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="read(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(byte b[],
                 int off,
                 int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads up to <code>len</code> bytes of data from this input stream 
 into an array of bytes. This method blocks until some input is 
 available.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read.
    <dd> off - the start offset of the data.
    <dd> len - the maximum number of bytes read.
    <dt> <b>Returns:</b>
    <dd> the total number of bytes read into the buffer, or
             <code>-1</code> if there is no more data because the end of
             the file has been reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#read(byte[], int, int)">read</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="skip(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="skip"><b>skip</b></a>
<pre>
 public native long skip(long n) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Skips over and discards <code>n</code> bytes of data from the 
 input stream. The <code>skip</code> method may, for a variety of 
 reasons, end up skipping over some smaller number of bytes, 
 possibly <code>0</code>. The actual number of bytes skipped is returned.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> n - the number of bytes to be skipped.
    <dt> <b>Returns:</b>
    <dd> the actual number of bytes skipped.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#skip(long)">skip</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="available()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="available"><b>available</b></a>
<pre>
 public native int available() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the number of bytes that can be read from this file input
 stream without blocking.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the number of bytes that can be read from this file input
             stream without blocking.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#available()">available</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 public native void close() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Closes this file input stream and releases any system resources 
 associated with the stream.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.InputStream.html#close()">close</a> in class <a href="java.io.InputStream.html#_top_">InputStream</a>
  </dl></dd>
</dl>
<a name="getFD()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFD"><b>getFD</b></a>
<pre>
 public final <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a> getFD() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the opaque file descriptor object associated with this stream.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the file descriptor object associated with this stream.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a>
  </dl></dd>
</dl>
<a name="finalize()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="finalize"><b>finalize</b></a>
<pre>
 protected void finalize() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Ensures that the <code>close</code> method of this file input stream is
 called when there are no more references to it.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#finalize()">finalize</a> in class <a href="java.lang.Object.html#_top_">Object</a>
    <dt> <b>See Also:</b>
    <dd> <a href="#close()">close</a>
  </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.FileDescriptor.html#_top_">Previous</a>  <a href="java.io.FileOutputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
