I used StreamReader, StreamWriter, TextWriter, BinaryWriter and so on classes on .NET. They were so useful. And in Cocoa, I can’t find similar classes. There’re only basic streams and some classes. I can make some similar classes myself, but I want to know is there pre-implemented classes or not before making new one.
Can you let me know about stream related classes on Cocoa or CoreFoundation?
The stream classes for Core Foundation are CFReadStream and CFWriteStream– see CFNetwork Programming Guide. Their Cocoa counterparts are NSInputStream and NSOutputStream– see Stream Programming Guide for Cocoa
Their functionality is extremely basic (for example, you can’t seek in read/input streams) so I’ve found that their functionality is limited. They are suited for use with
CFNetwork, but other than that I have rolled my own when the need arose. Not being familiar with .NET it sounds like the classes you reference are almost Java-like adapters, which unfortunately these aren’t.