title: File conversion issue in Objective C
body: <p>i am using this code in time of file uploading </p>
  
  <pre><code>        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
          NSString *documentsDirectory = [paths objectAtIndex:0];
          filePath1 = [documentsDirectory stringByAppendingPathComponent:@"myVoice.caf"];// specify your audioname
          NSLog(@"***************************");
          NSLog(@"%@",filePath1);
  
  
          NSDictionary *fileAttributes1 = [fileManager attributesOfItemAtPath:filePath1 error: NULL];
          NSNumber *fileSize1 = [fileAttributes1 objectForKey:NSFileSize];
          NSLog(@"%@",fileSize1);
           NSLog(@"***************************");
  
  
          NSString *file2 = [[NSBundle mainBundle] pathForResource:filePath1 ofType:@"caf"];
          NSData *file1Data = [[NSData alloc] initWithContentsOfFile:file2];
  
          NSLog(@"**************&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;*************");
          NSLog(@"%@",file1Data);
          NSLog(@"**************&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;**************");
  </code></pre>
  
  <p>===============================================</p>
  
  <p>Now the o/p is </p>
  
  <pre><code>2012-11-30 16:39:39.719 Varsity[4802:1a303] /Users/Esolz/Library/Application Support/iPhone Simulator/5.1/Applications/FAED7832-392C-4BFE-9A9B-D18B749FDC9B/Documents/myVoice.caf
  2012-11-30 16:39:39.719 Varsity[4802:1a303] 542752
  2012-11-30 16:39:39.719 Varsity[4802:1a303] ***************************
  2012-11-30 16:39:39.719 Varsity[4802:1a303] **************&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;*************
  2012-11-30 16:39:39.719 Varsity[4802:1a303] (null)
  2012-11-30 16:39:39.719 Varsity[4802:1a303] **************&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;**************
  </code></pre>
  
  <p>==============================</p>
  
  <p>actually the main issue is in these two lines</p>
  
  <pre><code>NSString *file2 = [[NSBundle mainBundle] pathForResource:filePath1 ofType:@"caf"];
  NSData *file1Data = [[NSData alloc] initWithContentsOfFile:file2];
  </code></pre>
  
  <p>It is unble to convert the file. Where i m getting wrong</p>