1. Loading Data from Files and URLs
// Assuming that there is a text file at /Examples/Test.txt:NSString* filePath = @"/Examples/Test.txt";NSData* loadedData = [NSData dataWithContentsOfFile:filePath];
2. Load NSData into a string
NSString* loadedString = [[NSString alloc] initWithData:loadedDataencoding:NSUTF8StringEncoding];
3. Write NSData into a file
// Here, loadedData is an NSData objectNSString* filePath = @"/Examples/Test.txt";[loadedData writeToFile:filePath atomically:YES];