Quote:
Originally Posted by rocotilos
I want to know the equivalent of these classes in Obj-C:
BinaryWriter
StringCollection
MemoryStream
I am trying to basically create a file, bit by bit (from header, etc), I found a code in C#, some part of it I can make sense of it, but Im not sure the equivalent of the above classes/types of C# in Obj-C.
Any C# guru lurking in here, pls help... I would appreciate it very much!!
Thanks.
EDIT: darn it, i mistyped the subject. it is not "helo", but "help". Sorry.
|
I'm not sure of Obj C having familar things, but C does.
BinaryWriter is just equivalent to using fopen and fwrite, to open/create a binary file, and write values to it. (Int, float, short, bytes, etc, not classes/objects)
StringCollection is basically a linked list of null terminated strings. This could be done with Char *, STL String, or maybe NSStrings, I imagine written out to file, it includes a total number of strings, and a number of characters per each string entry.
MemoryStream, is essentially just a dynamically re-sizeable memory block or array that you stuff with values (int, short, float, etc). This can easily be done by just allocating a block of memory, and using memcpy, and resizing as needed.
If you post more specifics or the code itself, might be able to help more.