What is the Gist of an “IOStream” or an “I/O Stream” in Programming?

(Note: this post is based on two Java-based sources and one C++-based source. It may not be true for every program)

First, the “I” in IOStream seems to stand for “Input” and the “O” seems to stand for “Output.” So these might be thought of as “Input/Output Streams“. But what is a stream? A stream can be thought of as either the source or destination of a sequence of data or as the sequence of data itself [1,2,3]. The source/destination can be varied and the types of data can be varied [1]. “A program uses an input stream to read data from a source, one item at a time… [and] an output stream to write data to a destination, one item at time” [1]. “Once a file stream is used to open a file, any input or output operation performed on that stream is physically reflected in the file” [2]. “No matter where the data is coming from or going to and no matter what its type, the algorithms for sequentially reading and writing data are basically the same:” [3]

Source: [3]

[1]: “I/O Streams,” Oracle Java Documentation

[2]: “Input/Output,” cplusplus.com

[3]: “Overview of I/O Streams,” The JavaTM Tutorial

.

Disclaimer:

I am not a professional in this field, nor do I claim to know all of the jargon that is typically used in this field. I am not summarizing my sources; I simply read from a variety of websites until I feel like I understand enough about a topic to move on to what I actually wanted to learn. If I am inaccurate in what I say or you know a better, simpler way to explain a concept, I would be happy to hear from you :).

Published by

George Evans

BS in Physics with a Minor in Mathematics.

Leave a Reply

Your email address will not be published. Required fields are marked *