IO 输入输出 Byte


















public class CopyFileDemo { public static void main(String[] args) throws IOException { FileInputStream fis = new FileInputStream("D:\\windows.iso"); FileOutputStream fos = new FileOutputStream("D:\\win10.iso"); byte[] bytes = new byte[2048]; int len = 0; while ((len = fis.read(bytes)) != -1) { fos.write(bytes, 0, len); } fos.close(); fis.close(); } }

浙公网安备 33010602011771号