because it’s abstract, create instances with static method to create because we can’t directly new an abstract class (in the static method, it instantiates some subtype of ByteBuffer)
Represents a file descriptor (an integer internal to the process representing an open file).
java.io.InputStream abstract class represents the general idea of a source of data from which we can read bytes, such as a file or network connection. A
java.io.FileInputStream represents an input stream reading bytes from an open file.
3 constructors: File, string (path), or FileDescriptor
To create a
FileInputStream from an already open file, pass the constructor the open file’s
java.io.OutputStream abstract class represents the general idea of a something to which we can write bytes, such as a file or network connection. A
java.io.FileOutputStream represents an input stream reading bytes from a file.
Imagine a method where you wanted to read bytes but didn’t care what kind of source: sometimes it might be a file, sometimes it might be a data connection, etc. In that case, the method would receive an InputStream rather than any specific kind of InputStream.
A Reader reads characters from a data source.
FileReader is a convenience type that wraps InputStreamReader, FileInputStream, and File)
convenience static methods that operate on files many conveniences for common file operations: copying files, deleting files