Java FileInputStream Methods
FileInputStream Methods
The FileInputStream
class provides methods to read data (as bytes) from a file:
Method | Description | Return Type |
---|---|---|
available() | Returns the number of bytes that can be read without blocking | int |
close() | Closes the stream and releases system resources | void |
read() | Reads one byte of data | int |
read(byte[] b) read(byte[] b, int off, int len) |
Reads bytes into an array (or part of an array) | int |
skip(long n) | Skips over and discards n bytes of data | long |
getFD() | Returns the file descriptor object associated with the stream | FileDescriptor |
getChannel() | Returns the unique FileChannel object for this stream |
FileChannel |