java-输出文件(模板)

byte[] buffer = new byte[1024 * 1024];//缓冲区
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(
        new FileOutputStream(
                new File()
        )
);
bufferedOutputStream.write(buffer);
bufferedOutputStream.close();
bufferedOutputStream.flush();
posted @ 2024-11-10 02:19  基础狗  阅读(1)  评论(0编辑  收藏  举报