Re: NSMutableArray to NSData
Re: NSMutableArray to NSData
- Subject: Re: NSMutableArray to NSData
- From: Andreas Monitzer <email@hidden>
- Date: Sun, 6 Jan 2002 15:56:24 +0100
On Sunday, January 6, 2002, at 03:45 , email@hidden wrote:
Quick question: I need to convert NSMutableArray into an NSData object.
I am planning to do that my writing the NSMutableArray to a file in
/tmp and then reading the contents of the file in the NSData. Finally I
will unlink the /tmp file.
This is a pretty stupid approach to solving my problem. Is there
anything better out there?
NSData *myData=[NSArchiver archivedDataWithRootObject:myMutableArray];
andy