title: Reading Data from File in Objective-C
body: <p>I want to read the string after delimiter from a text file in Objective-C.i'm stil struggling to get it :(.... This is wat i ve done til nw, but when i print the contents of databuffer in line 7 in code below, the data read is returning encapsulated in an NSData object.<strong>How to convert it into Readable format?</strong></p>
  
  <pre><code>NSData *databuffer;
  
  file = [NSFileHandle fileHandleForReadingAtPath: @"/tmp/myfile.txt"];
  
  if (file == nil)
          NSLog(@"Failed to open file");
  
  [file seekToFileOffset: 10];
  
  databuffer = [file readDataOfLength: 6];
  
  NSLog(@"Contents of buffer = %s", databuffer);
  
  [file closeFile];
  </code></pre>