透过NSInputStream读取大文件的指定起始内容

通过NSInputStream读取大文件的指定起始内容转载自:http://www.cocoachina.com/bbs/read.php?tid-60598.ht

通过NSInputStream读取大文件的指定起始内容

转载自:http://www.cocoachina.com/bbs/read.php?tid-60598.html

?

NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingAtPath:filePath];[fileHandle seekToFileOffset:1000];NSData *data = [fileHandle readDataOfLength:2000];
?