I have an array of arrays (an NSArray which contains NSArray objects) that live in a server in my MBP. I need to serialize and then stream this object to an iPad client that's connected to this server and then reconstruct the object on the client.
I know how to archive this object and if I wanted to write the archive to a file I know how to do that. But my issues are different.
.............
My output stream can use a write method:
that writes maxLength bytes from a buffer. My input stream on the receiving end (client) can use a read method:
that reads maxLength bytes into a buffer. So my two problems are: how should I load the outgoing buffer from the archive of the original NSArray AND how should I unload the receiving buffer into an archive on the client?
I do know how to go from an NSArray to an archive and how to go from an archive back to an NSArray.
I know how to archive this object and if I wanted to write the archive to a file I know how to do that. But my issues are different.
.............
My output stream can use a write method:
Code:
write:maxLength:
Code:
read:maxLength:
I do know how to go from an NSArray to an archive and how to go from an archive back to an NSArray.