复习一下 主要是吧BufferedOutputstream 定义在while循环中 不然没法切割成多个文件...
class practice25
public static void main(String[] args) throws Exception
{
BufferedInputStream bs=new BufferedInputStream(new FileInputStream("25.mp3"));
byte[] b=new byte[1024*1024];
int count=1;
while((len=bs.read(b))!=-1)
{
BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream((count++)+".part"));
bos.write(b,0,len);
bos.flush();
}