import java.io.*; public class Test{ public static void main(String args[]) throws IOException{ int bf; BufferedInputStream src = new BufferedInputStream(new FileInputStream("c:¥¥a.exe")); BufferedOutputStream dest = new BufferedOutputStream(new FileOutputStream("c:¥¥b.exe")); while ((bf = src.read()) >= 0){ dest.write(bf); } dest.flush(); src.close(); dest.close(); } }