Java

How to Use FileInputStream In Java1 min read

Java Code:

The Java.io.FileInputStream class obtains input bytes from a file in a file system.




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.

FileInputStream(FileDescriptor fdObj) – creates a FileInputStream by using the file descriptor fdObj, which represents an existing connection to an actual file in the file system.

FileInputStream(String name) – creates a FileInputStream by opening a connection to an actual file, the file named by the path name name in the file system.

Leave a Comment