Stream & Buffer

  • File itself is composed by binary data

  • Buffer is to represent the binary data containing a number of byte

  • Due to the memory size of program is limited, it is not allowed to use buffer to hold too many bytes

  • Stream is basically a on-going process, to let you divide the large size of data into chunk and transfer in batch

  • With the definition of larger buffer size, it can reduce the number of i/o of file from disk, in order to improve the speed of reading or writing the file

  • As the buffer size is constant, so the file can be processed constantly

Last updated

Was this helpful?