Objective-C: C# BinaryReader and BinaryWriter?

Discussion in 'Mac Programming' started by timehacker11, May 1, 2013.

  1. macrumors newbie

    Joined:
    Apr 3, 2013
    #1
    I'm a .NET programmer, and would like to know if there is an equivalent of .NET's BinaryReader and BinaryWriter for Objective-C.

    Thanks,
    timehacker11.
     
  2. macrumors 6502a

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #2
    Perhaps if you told us what they do, we can answer that question. Offhand, given the names... when using an NSData object:

    Code:
    – initWithContentsOfFile:options:error:
    – writeToFile:options:error:
     
  3. thread starter macrumors newbie

    Joined:
    Apr 3, 2013
    #3
    Basically, Binary Readers and Writers allow you to read and write primitive file types. (Not the usual file types like txt, xml, etc)

    I want to read and write to .blight files. The BLIGHT file is described here:
    http://wiki.tockdom.com/wiki/Blight_(File_Format)

    Thanks,
    timehacker11.
     
  4. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    Use posix calls. Or NSFileHandle. Or NSInputStream. Or the NSData methods mentioned above.
     

Share This Page