I wanted to implement the idea of working with a file as an array. Here is a piece of code. After the next write, the same data is returned from the stream. If I do a flush,