dbf文件能否像复制其它文件一样用java.io操作呢?
dbf文件能否像复制其它文件一样用java.io操作呢?代码如下:
public void copyFile(String fromPath,String toPath){
BufferedReader reader = null;
PrintWriter writer = null;
try{
reader = new BufferedReader(new FileReader(new File(fromPath)));
writer = new PrintWriter(new File(toPath));
String line = reader.readLine();
while(line!= null){
writer.println(line);
line= reader.readLine();
}
}catch (Exception e) {
e.printStackTrace();
}finally{
try {
reader.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
writer.close();
/*if(writer!=null){
writer.close();
}
if(reader!=null){
try {
reader.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}*/
}
} --------------------编程问答-------------------- 谁来帮帮我呀。。。。。。
补充:Java , Java相关