1.創(chuàng)建容量為length == 10的Bytes數(shù)組
NSInteger length = 10;
Byte *bytes= malloc(sizeof(Byte)*(length));
2.創(chuàng)建定容量Bytes數(shù)組
Byte bytes[] = {1,2,3};
3.與NSData轉(zhuǎn)化
NSData *data = [[NSData alloc] initWithBytes:bytes length:length];