I have managed to NSInputStream and read some data to NSMutableData object. I am able to put this data into string and NSLog it, however when I try to access its length(I am assuming this is its size in bytes) my app crashes.
NSString *stringData=[[NSString alloc]initWithData:self.data encoding:NSUTF8StringEncoding];
NSLog(@"%@ thats data",stringData);//logs out content of data
NSLog(@"%@ thats data length",[self.data length]);//crashes
So my question is if I call copy on NSMutableDate do I get immutable copy ? Am I tying to access the length in a wrong manner ?