如何公开我流的子部分用户 [英] How to expose a sub section of my stream to a user

查看:119
本文介绍了如何公开我流的子部分用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含许多数据流。我要揭露​​只是一块在另一个流的数据。这件作品的数据我想提取往往可以超过100MB。既然我已经在它的数据流好像浪费将数据复制到另一个流并返回。什么即时寻找是引用数据的第一数据流中,同时控制第二物流可以多少它引用一个方法。这是可能的。

I have a stream that contains many pieces of data. I want to expose just a piece of that data in another stream. The piece of data I want to extract can often be over 100mb. Since I already have stream with the data in it it seems like a waste to copy that data to another stream and return that. What im looking for is a way to reference the data in the first stream while controlling how much of it the second stream can reference. Is this possible

推荐答案

您需要做一个验证它的位置,并返回所需的子集,你自己的Stream类。

You need to make your own Stream class that validates its position and returns the desired subset.

我不知道任何内置类,做到这一点的。

I'm not aware of any built-in classes that do this.

这篇关于如何公开我流的子部分用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆