Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any Objective-C equivalent for "Buffer" class in Java?

I am trying to find any equivalent class or library for the "Buffer" object in Objective C. Here is the documentation of the "Buffer" class in Java: http://docs.oracle.com/javase/1.4.2/docs/api/java/nio/Buffer.html I need it in objective-C. Thank you.

like image 510
Legnus Avatar asked Dec 21 '22 00:12

Legnus


2 Answers

Look at NSMutableData or NSData.

NSData and its mutable subclass NSMutableData provide data objects, object-oriented wrappers for byte buffers. Data objects let simple allocated buffers (that is, data with no embedded pointers) take on the behavior of Foundation objects.

like image 133
beryllium Avatar answered Feb 23 '23 15:02

beryllium


Look at NSMutableData

like image 22
Chen Harel Avatar answered Feb 23 '23 17:02

Chen Harel