title: read data of specific length from a specific position ios
body: <p>I have the following code for reading a file in length of specific size:</p>
  
  <pre><code>  int chunksize = 1024;
    NSData*  fileData = [[NSFileManager defaultManager] contentsAtPath:URL];
    NSString* fileName = [[message.fileURL lastPathComponent] stringByDeletingPathExtension];
    NSString*  extension = [[message.fileURL pathExtension] lastPathComponent];
    NSFileHandle*  fileHandle = [NSFileHandle fileHandleForReadingAtPath:[self retrieveFilePath:fileName andExtension:extension]];
    file=@"test.png";
  
      int numberOfChunks =  ceilf(1.0f * [fileData length]/chunksize); //it s about 800
  
      for (int i=0; i&lt;numberOfChunks; i++)
      {
          NSData *data = [fileHandle readDataOfLength:chunksize];
          ....//some code
      }
  
  // read a chunk of 1024 bytes from position 2048
   NSData *chunkData = [fileHandle readDataOfLength:1024 fromPosition:2048];//I NEED SOMETHING LIKE THIS!!
  </code></pre>