NSFileHandle目前木有用到。。保存下。。

来源:互联网 发布:vb语言入门教程 编辑:程序博客网 时间:2024/04/26 15:43

如何读取大文件   

万能的Stackoverflow给出了答案
Use NSFileHandle: Seek to the offset where your data starts and start reading from there.

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

另外分享给大家一个苹果App下载站 http://appfishr.com
很多App可以直接下载解包研究一下