BufferedInputStream Class
Package: java.io
The BufferedInputStream class reads characters from an input stream, using a buffer for increased efficiency. (A buffer is a temporary storage area that allows your program to read a large amount of data from disk at one time, and then hold it there until your program needs it.)
Note that you won’t typically work directly with the Buffered InputStream class. Instead, you’ll use it to connect to a DataInputStream, which has more advanced features for reading input data from binary files. For more information, see DataInputStream Class.
Constructor
|
Constructor |
Description |
|
|
Creates a buffered input stream from any object that extends the |
Methods
|
Method |
Description |
|
|
Returns the number of bytes available in the input stream. |
|
|
Closes the file. |
|
|
Reads a single character from the input stream and returns it as an integer. The method returns |
|
|
Reads multiple characters into an array. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access