• λ我爱Aspx >> Asp.Net >> 为什么我从网上抓取的数会有总是
  • 为什么我从网上抓取的数会有总是

  • :aspxer  Դ:csdn  :2007-7-6 2:38:03  ؼ:
  • out.println(e.toString());

    }

    try{

    bos = new BufferedOutputStream(new FileOutputStream(f));;

    byte[] b = new byte[178];

    while(bis.read(b,0,b.length)!=-1) {

    bos.write(b);

    }

    }catch(Exception e){

    out.println(e.toString());

    }finally{

    try{

    bos.flush();

    bis.close();

    httpUrl.disconnect();

    }catch(Exception e){

    out.println(e.toString());

    }

    }

    %>

    抓下的mp3文件播放的时候会像卡带的样子,为什么呀

    第2楼. 由 adverse 于 2007-6-24 13:17:48 发表

    你确定原来的mp3是不卡的吗?

    第3楼. 由 jinwenming 于 2007-6-24 13:31:01 发表

    当然

    第4楼. 由 zqrqq 于 2007-6-24 13:36:16 发表

    把这段

    byte[] b = new byte[178];

    while(bis.read(b,0,b.length)!=-1) {

    bos.write(b);

    }

    改成

    byte[] b = new byte[178];

    int count=0;

    while((count=bis.read(b,0,b.length))!=-1) {

    bos.write(b, 0, count);

    }

    试试!?

    第5楼. 由 Avoid 于 2007-6-24 13:44:00 发表

    因为你在处理while(bis.read(b,0,b.length)!=-1) 时如果发生异常,那么就跳出循环了。

    所以导致文件没下全。

    把try catch重新写过,发生异常后继续读。。。直到读到为止

    Ҷƪл˵?
  • һƪ【99%的人没见过的ASP注入,等待高手解决,急。。。。。。。。。 】
    һƪ如何写一个DAT文件,将dbf文件的数据导入到access数据库中