其他分享
首页 > 其他分享> > BufferedInputStream和BufferedOutputStream的使用极其方法

BufferedInputStream和BufferedOutputStream的使用极其方法

作者:互联网

BufferedInputStream和BufferedOutputStream的使用极其方法



@Test
    public void BufferedInputS()throws IOException{
        String inpath = "D:\\ZJC-in\\video2.wmv";
        String outpath = "D:\\ZJC-out\\video1.wmv";
        int readline = 0;
        byte b[] = new byte[1024];
        BufferedInputStream  bi  = new BufferedInputStream(new FileInputStream(outpath));
        BufferedOutputStream bo = new BufferedOutputStream(new FileOutputStream(inpath));
        while((readline = bi.read(b)) != -1 ){
            bo.write(b,0,readline);
        }
        if(bi != null){
            bi.close();
        }
        if(bo != null){
            bo.close();
        }

标签:BufferedInputStream,bo,bi,BufferedOutputStream,极其,new,readline
来源: https://blog.csdn.net/NJUSTZJC/article/details/121303432