import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class CopyDemo
{
public static void main(String[]args) throws IOException
{
FileInputStream fis = new FileInputStream(c:\\1.mp3);
FileOutputStream fos = new FileOutputStream(c:\\2.mp3);
int ch = 0;
while((ch = fis.read())!=-1)
{
fos.write(ch);
}
fos.close();
fis.close();
}
}
|
|