本帖最后由 覃宏海 于 2012-9-14 17:00 编辑
package day14;
import java.io.*;
public class CopyMp3 {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
BufferedInputStream bis =
new BufferedInputStream(new FileInputStream("d:\\1.mp3"));
BufferedOutputStream bos =
new BufferedOutputStream(new FileOutputStream("d:\\2.mp3"));
int by = 0;
while((by = bis.read())!=-1)
bos.write(by);
bis.close();
bos.close();
}
}
eclipse上提示红色这句话有问题。问题在哪里?
以下是错误提示!
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor BufferedOutputStream(FileOutputStream) is undefined
The constructor FileOutputStream(String) is undefined
at day14.CopyMp3.main(CopyMp3.java:12)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eclipse用的是它自带的编译器吗?我在editplus上却可以用!eclipse的原理是什么?
|