From Binary to String
If binary data is in NSData:NSString *theStr = [[NSString alloc] initWithData:theData encoding:NSUTF8StringEncoding];
If it is in a char[]:
NSString * theStr =[[NSString alloc] initWithBytes:theBytes length:numBytes encoding:NSUTF8StringEncoding];
NSData *theData = [theStr dataUsingEncoding:NSUTF8StringEncoding];
No comments:
Post a Comment