What is a file
Files can be thought of as related records or data sets that are put together
To read and write files through streams
A stream is a series of flowing characters, a channel that sends information in FIFO mode.
The input and output stream is relative to the memory of the computer
The byte stream is a eight-bit universal byte stream, and the character stream is a 16-bit uncode character stream
Read and write text files
Read and write text files with FileInputStream and FileOutputStream
Read and write text files with BufferedReader and BufferedWriter
Binary file read/write
Read and write binary files using DataInputStream and DataOutputStream
BYTE stream
1 input stream
Base class: Inputstrream
Sub-Category: FileInputStream
Structure:
FileInputStream (File file)
FileInputStream (String name)
Method:
int read () bytes returned in bytes
Read (byte [] b) reads a byte array to return the length of the read-in byte array
Read (Byte [] b,int off,int len)
Io in Java