nssting转byte
NSString *str = @"你好啊,aBc!";
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(NSUTF16BigEndianStringEncoding);
NSData *data = [str dataUsingEncoding:enc];
Byte *byte = (Byte *)[data bytes];
for (int i=0 ; i<[data length]; i++) {
}
byte转nsstring
Byte array[] = {79,96,89,125,85,74,0,44,0,97,0,66,0,99,0,33};
[[NSString alloc]initWithBytes: byte length:sizeof(byte) encoding:NSUTF16StringEncoding]