用下面两个方法,先作个标记,再reset到那个位置。(int readlimit) 
          Marks the current position in this input stream.reset() 
          Repositions this stream to the position at the time the  method was last called on this input stream.

解决方案 »

  1.   

    我也查过Help, 使用了这种方法, 从网上下一个2K的文件没问题的, 但是down一个6k的文件时,它会给我报一个返回到错误的position。 举例来说,如果是新浪这样的首页下下来可不止几K了。方法好像要保存从位置到你调用reset的所有内容。 是我的Buffer不够大?
      

  2.   

    InputStream又没有实现Serializable 接口,不能被复制你可以先转换到字节或字符数组。CharArrayReaderByteArrayInputStream