提示出现问题的行为:
rst = is.read(buf,begin,len);

解决方案 »

  1.   

    http://sourceforge.net/projects/jquickdownflag = is.read(buff);
    os.write(buff,0,flag);
      

  2.   

    while(is.available() < (begin + len))
    这句话,对于读取网络的数据来说is.available()是不可靠的。
      

  3.   

    你看看jdk,inputstream的read的定义是什么!显然是第二个参数错了,正好抛的是BoundsException    public int read(byte b[], int off, int len) throws IOException {
    if (b == null) {
        throw new NullPointerException();
    } else if ((off < 0) || (off > b.length) || (len < 0) ||
       ((off + len) > b.length) || ((off + len) < 0)) {
        throw new IndexOutOfBoundsException();
    } else if (len == 0) {
        return 0;
    }
    ........................* @param      off   the start offset in array <code>b</code>
         *                   at which the data is written.