In this tutorial, we will discuss the use of available() and
skip() function of FileInputStream class. The FileInputStream
class creates a input stream for reading bytes from file. The
FileInputStream class is available in java.io package. With the
help of this example, you will see how to calculate the size of
file and use of skip function. First of all, we will create
input stream for reading bytes from file with the
FileInputStream class. The availabe() method of the
FileInputStream class return available number of bytes in a
file, and the skip(long count) method of the FileInputStream
class skip given number of byte from input stream. About
FileInputStream API: The java.io.FileInputStream class extends
java.io.IntputStream class. It provides following methods:
|int||available()||The available method Returns the integer
number of bytes available in this file input stream.|
|void||close()||The close() method use to close this file input
stream and system resources used by this stream.|
|finalize()||The fina