如何从InputStream流中读取制定位置到文件尾的数据流。我的意思是有InputStream我想从流的1024字节开始往后读取到文件尾。

解决方案 »

  1.   

    哈哈。getBytes() 到一个byte[1024],忽略第一个就可以啊。
      

  2.   

    skip
    public long skip(long n)
              throws IOException
    Skips over and discards n bytes of data from this input stream.
      

  3.   

    getBytes() 到一个byte[1024],忽略第一个就可以啊。
    --------------
    InputStream, 如何getBytes()?
      

  4.   

    getBytes() 到一个byte[1024],忽略第一个就可以啊。
    --------------
    InputStream, 如何getBytes()?
    ---------------
    就是读到一个byte数据里。
    大概是那个意思啦。
      

  5.   

    if(in.available()<1024)
     ;//can not
    else {
     in.skip(1024);//跳过1024
     byte b[]  = new byte[in.available() - 1024];//存放字节的数组
     in.read(b);
    }
      

  6.   

    in.skip(1024);
     byte b[]  = new byte[in.available() - 1024];
     in.read(b);