So I know how to use Streams in text files, but is there a way to use streams for files other than text? (I tried to use streams in a Word File, but it turned out to be corrupt.)
Streams work with binary data. Your problem is most likely related to how you send data to the stream, not with the stream itself.
The StreamWriter
class is specialized in converting strings to a binary data, and then sending them to a Stream
.
If you want to write binary data to a stream, you can use the Stream interface itself. There's no need to use a Writer.