WHATS THE NSCODER CLASS USED FOR?

Felix Pickles

Total Post:3

Points:15
Posted by  Felix Pickles
 2227  View(s)
Ratings:
Rate this:
  1. Felix Pickles

    Post:3

    Points:15
    Whats the NSCoder class used for?

    NSCoder is an abstractClass which represents a stream of data. They are used in Archiving and Unarchiving objects. NSCoder objects are usually used in a method that is being implemented so that the class conforms to the protocol. (which has something like encodeObject and decodeObject methods in them).

    NSCoder operates on objects, scalars, C arrays, structures, and strings, and on pointers to these types. It does not handle types whose implementation varies across platforms, such as union, void *, function pointers, and long chains of pointers. A coder object stores object type information along with the data, so an object decoded from a stream of bytes is normally of the same class as the object that was originally encoded into the stream.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!