本帖最后由 u011764356 于 2014-01-10 15:48:04 编辑

解决方案 »

  1.   

    byte[] db = new byte[newfileLength];
    bisSendSrc.read(db, 0, newfileLength);
    bosSendTemp.write(db);
    应该循环的吧
    while ((c = bisSendSrc.read(bytes)) != -1) {
    bosSendTemp.write(bytes, 0, c);
    }
      

  2.   

     bosSendTemp.write(db);    
    之后flush下,再关闭流
      

  3.   

    调用了close(),没有调用flush(),因为我看FilterOutputStream类的close()函数中已经调用了flush()函数,代码如下:public void close() throws IOException {
    try {
      flush();
    } catch (IOException ignored) {
    }
    out.close();
        }
      

  4.   

    需要我自己调用flush()函数吗,因为我看FilterOutputStream类close()中已经调用了flush()函数啊。Java代码如下:public void close() throws IOException {
    try {
      flush();
    } catch (IOException ignored) {
    }
    out.close();
        }
      

  5.   

    需要我自己调用flush()函数吗,因为我看FilterOutputStream类close()中已经调用了flush()函数啊。Java代码如下:public void close() throws IOException {
    try {
      flush();
    } catch (IOException ignored) {
    }
    out.close();
        }out.close();也会抛出Exception的