API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. FileInputStream View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.68, 04/07/06
Serial
Hierarchy
 Object
      InputStream
          FileInputStream
Implements
Subclasses
Description
public class FileInputStream
  A FileInputStream obtains input bytes from a file in a file system.
Constructors
public FileInputStream (File file) throws FileNotFoundException
  Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.
public FileInputStream (FileDescriptor fdObj)
  Creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.
public FileInputStream (String name) throws FileNotFoundException
  Creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system.
Methods
Hide/Show inherited methods
publicnative int available () throws IOException [Overrides InputStream]
  Returns an estimate of the number of remaining bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
public void close () throws IOException [Overrides InputStream]
  Closes this file input stream and releases any system resources associated with the stream.
protected void finalize () throws IOException
  Ensures that the close method of this file input stream is called when there are no more references to it.
public FileChannel getChannel ()
  Returns the unique FileChannel object associated with this file input stream.
publicfinal FileDescriptor getFD () throws IOException
  Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.
publicsynchronized void mark (int readlimit) [Inherited From InputStream]
  Marks the current position in this input stream.
public boolean markSupported () [Inherited From InputStream]
  Tests if this input stream supports the mark and reset methods.
publicnative int read () throws IOException [Specified in InputStream]
  Reads a byte of data from this input stream.
public int read (byte[] b) throws IOException [Overrides InputStream]
  Reads up to b.length bytes of data from this input stream into an array of bytes.
public int read (byte[] b, int off, int len) throws IOException [Overrides InputStream]
  Reads up to len bytes of data from this input stream into an array of bytes.
publicsynchronized void reset () throws IOException [Inherited From InputStream]
  Repositions this stream to the position at the time the mark method was last called on this input stream.
publicnative long skip (long n) throws IOException [Overrides InputStream]
  Skips over and discards n bytes of data from the input stream.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar