All Implemented Interfaces:
Closeable, AutoCloseable

  • Constructor Summary

    Constructors

    Creates a FileInputStream to read from an existing file represented by the File object file.

    Creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.

    Creates a FileInputStream to read from an existing file named by the path name name.

  • Method Summary

    int

    available()

    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.

    void

    close()

    Closes this file input stream and releases any system resources associated with the stream.

    Returns the unique FileChannel object associated with this file input stream.

    getFD()

    Returns the FileDescriptor object that represents the connection to the actual file in the file system being used by this FileInputStream.

    int

    read()

    Reads a byte of data from this input stream.

    int

    read(byte[] b)

    Reads up to b.length bytes of data from this input stream into an array of bytes.

    int

    read(byte[] b, int off, int len)

    Reads up to len bytes of data from this input stream into an array of bytes.

    byte[]

    readNBytes(int len)

    Reads up to a specified number of bytes from the input stream.

    long

    skip(long n)

    Skips over and discards n bytes of data from the input stream.

  • Constructor Details

    • FileInputStream

    • FileInputStream

    • FileInputStream

  • Method Details

    • read

    • read

    • read

    • readNBytes

    • skip

    • available

    • close

    • getFD

    • getChannel