Flash cards
Review the key moves
1/3
Core idea
What is the main idea behind Java FileInputStream Methods?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Order
Put the learning moves in the order that makes the concept easiest to apply.
Java I/O Streams Tutorial
The FileInputStream class provides methods to read data (as bytes) from a file:
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() | Reads bytes into an array (or part of an array) | int |
| skip() | 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 |
Related Pages
Java I/O Streams Tutorial