int read(byte b, int off, int len) − This method accepts a byte array, its offset (int) and, its length (int) as parameters and reads the contents of the current InputStream, to the given array.This method returns an integer representing the total number of bytes or, -1 if the end of the file is reached. Int read(byte b) − This method accepts a byte array as parameter and reads the contents of the current InputStream, to the given array. This method returns -1 if the end of the file is reached. Int read() − This simply reads data from the current InputStream and returns the read data byte by byte (in integer format). Then read the contents of the specified file using either of the variants of read() method −.
0 Comments
Leave a Reply. |