Mr.savaliya
Mr.savaliya

Reputation: 259

Different between NSData and NSMutableData in iPhone

What is the difference between NSData and NSMutableData?

Upvotes: 5

Views: 1874

Answers (2)

DrC
DrC

Reputation: 7698

NSData is fixed after creation.

NSMutableData, as the name implies, allows operations that change the contents (appendBytes:, appendData, setData:...).

Upvotes: 3

Danny Beckett
Danny Beckett

Reputation: 20768

From the Stack Overflow tag-wikis:

The NSData class is an apple class for holding generic data. Often used when reading/writing from and to files, and the internet.

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

Upvotes: 3

Related Questions