简体   繁体   中英

Separate NSData into smaller NSMutableData objects

I am unsure of how to separate a NSData object into smaller parts so that I can send it over bluetooth. I believe it is a method similar to this:

- (void)getBytes:(void *)buffer range:(NSRange)range

I do not know what to pass in for the buffer. Do I just pass in a NSMutableData object to hold the bytes that I pull out of the original NSData?

Thanks

您可以使用-subdataWithRange:方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM