ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ package io.a3; //缓冲流千万别和虚拟内存混淆 import java.io.*; public class Test { public static void main(String[] args) throws Exception { BufferedInputStream hcfz = new BufferedInputStream( new FileInputStream("E:/javadaima/java2-1/333.wma")); BufferedOutputStream hczt = new BufferedOutputStream(new FileOutputStream("e:/222.wma")); byte[] hc = new byte[2048]; int ff; ff = hcfz.read(hc); while (-ff!=(-1)) { hczt.write(hc, 0, ff); ff = hcfz.read(hc); } hczt.flush(); hczt.close(); hcfz.close(); } } ~~~