📄 editdictionary.java
字号:
/*
* EditDictionary.java
*
* Created on 2006年12月13日, 下午10:37
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package checkspelling;
import java.io.*;
import java.util.*;
public class EditDictionary{
private String source;
private String object;
private File delPath;
/** Creates a new instance of dictionaryAction */
public EditDictionary() {
}
/*
*/
public void setSource(String source){
this.source=source;
}
public String getSource(){
return source;
}
public void setObject(String object){
this.object=object;
}
public String getObject(){
return object;
}
public void setDelPath(File delPath){
this.delPath=delPath;
}
public File getDelPath(){
return delPath;
}
/*
*define a method used to add dictionay
*/
public boolean addDictioanry(){
if(getSource()!=null){
try{
FileInputStream fileInput=new FileInputStream(getSource());
DataInputStream in=new DataInputStream(fileInput);
//creat input stream
FileOutputStream fileOutput=new FileOutputStream(getObject());
DataOutputStream out=new DataOutputStream(fileOutput);
//create output stream
int i;
while((i=in.read())!=-1){
out.write(i);
}
in.close();
out.close();
return true;
}
catch(Exception e){
return false;
}
}
else{
return false;
}
}
/*
*define a method used to delete the dictionary files
*/
public boolean delDictionary(){
if(delPath.getPath()!=null){
try{
delPath.delete();
return true;
}
catch(Exception e){
return false;
}
}
else{
return false;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -