Generating and computing with streams requires lazy evaluation, either implicitly in a lazily evaluated language or by creating and forcing thunks in an eager language. In total languages they must be defined as codata and can be iterated over using (guarded) corecursion.
UML package diagram of the stream hierarchy in .NET
Java provides the Stream interface under the java.util.stream namespace.
JavaScript provides the ReadableStream, WritableStream and TransformStream interfaces.[3]
Python have the StreamReader and StreamWriter classes in the asyncio module.[4]
.NET provides the abstract class Stream[5] which is implemented by classes such as FileStream and MemoryStream.[6]
In Rust a struct can implement the Read trait.[7] There is also the Cursor struct wraps an in-memory buffer.[8]