|
| FileInputStream (File file) throws FileNotFoundException |
|
| FileInputStream (FileDescriptor fd) |
|
| FileInputStream (String path) throws FileNotFoundException |
|
int | available () throws IOException |
|
void | close () throws IOException |
|
final FileDescriptor | getFD () throws IOException |
|
int | read () throws IOException |
|
int | read (byte[] buffer) throws IOException |
|
int | read (byte[] buffer, int byteOffset, int byteCount) throws IOException |
|
long | skip (long byteCount) throws IOException |
|
| InputStream () |
|
int | available () throws IOException |
|
void | close () throws IOException |
|
void | mark (int readlimit) |
|
boolean | markSupported () |
|
abstract int | read () throws IOException |
|
int | read (byte[] buffer) throws IOException |
|
int | read (byte[] buffer, int offset, int length) throws IOException |
|
synchronized void | reset () throws IOException |
|
long | skip (long byteCount) throws IOException |
|
An input stream that reads bytes from a file.
File file = ...
InputStream in = null;
try {
...
} finally {
if (in != null) {
in.close();
}
}
This stream is not buffered. Most callers should wrap this stream with a BufferedInputStream.
Use FileReader to read characters, as opposed to bytes, from a file.
- See also
- BufferedInputStream
-
FileOutputStream