Pipeline中的ReadOnlySeekableStream不包含任何内容 [英] ReadOnlySeekableStream in Pipeline contains nothing

查看:101
本文介绍了Pipeline中的ReadOnlySeekableStream不包含任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个扩展XmlDasmComp的管道组件。在getNext方法中,我试图在返回之前将流的位置设置回0。我这样做


如果

Hi All,
I have a pipeline component which extends XmlDasmComp. In the getNext method I am trying to set the position of the stream back to 0 before returning it. I am doing this

if

推荐答案

我无法得到什么是这里有问题。
当你说,可搜索流不包含任何内容时,你的意思是从包装流中读取不返回数据吗?如果原始流在流的末尾,则可能发生这种情况。通过使用只读可搜索流包装原始流,您可以获得底层流的搜索行为,从当前偏移到底层流的末尾。对于已从uderlying流中读取的数据,您无法再次读取该数据。

I am not able to get what is the problem here.
When you say, seekable stream does not contain anything, do you mean reading from the wrapped stream returns no data?
This could happen if the original stream was at the end of stream. By wrapping the original stream with read only seekable stream, you getting the seeking behaviour for the underlying stream from the current offset to the end of the underlying stream. For data which has already been read from the uderlying stream, you can not read that data again.


这篇关于Pipeline中的ReadOnlySeekableStream不包含任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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