如何從NSData讀Byte?
NSData * theData = [NSData dataWithContentsOfFile: path];
const char* theBytes = (const char*)[theData bytes];
那讀幾個Byte?
NSRange range = NSMakeRange(location, length);
NSData *someData = [theData subdataWithRange:range];
const char* theBytes = (const char*)[
someData
bytes];
沒有留言:
張貼留言