Different between NSData and NSMutableData on iPhone

What is the difference between NSData and NSMutableData?

+5
source share
2 answers

From the tag tag wiki tag:

The NSData class is the apple class for storing shared data. Often used when reading / writing from and to files, as well as on the Internet.

NSMutableData (and its superclass NSData) provide data objects, object-oriented wrappers for byte buffers.

+3
source

NSData fixed after creation.

NSMutableDataAs the name implies, it allows you to perform operations that modify the contents of the ( appendBytes:, appendData, setData:...).

+3
source

All Articles