See NSMutableData or NSData .
NSData and its mutable subclass NSMutableData provide data objects, object-oriented wrappers for byte buffers. Data objects allow simple allocated buffers (that is, data without built-in pointers) to accept the behavior of Foundation objects.
source share