在特定位置启动NSInputStream

时间:2014-07-06 11:34:02

标签: cocoa-touch cocoa nsinputstream

我有一个输入流,我想开始在某个位置读取字节。有什么方法可以做到吗?假设我想在位置1024读取n个字节,n是文件中的nth个字节。我该如何实现这一目标?我查看了文档,似乎没有办法做到这一点。

1 个答案:

答案 0 :(得分:0)

您需要使用以下api阅读: -

+ (id)inputStreamWithFileAtPath:(NSString *)path

- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len;
相关问题