java.lang.Object | ||
↳ | java.io.InputStream | |
↳ | com.neomades.io.file.FileInputStream |
A file input stream is an input stream for reading data from a
File
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FileInputStream(String path)
Creates a FileInputStream by opening a connection to an actual file, the file
at the indicated path.
| |||||||||||
FileInputStream(File file)
Creates a FileInputStream by opening a connection to an actual file, the file
named by the File object file in the file system.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
read()
Reads the next byte of data from the input stream.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a FileInputStream by opening a connection to an actual file, the file at the indicated path.
path | the path of the file to open |
---|
IOException} if the file at the specified path cannot be opened | |
IOException |
Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.
file | the file to be opened for reading |
---|
IOException} if the file cannot be opened | |
IOException |
Reads the next byte of data from the input stream. The value byte is returned
as an int
in the range 0
to 255
. If no
byte is available because the end of the stream has been reached, the value
-1
is returned. This method blocks until input data is
available, the end of the stream is detected, or an exception is thrown.
A subclass must provide an implementation of this method.
-1
if the end of the stream is
reached.IOException |
---|