?? readio.java
字號:
import java.io.*;
public class readIO {
private String inputFile;
private ElemList elements;
private NodeList node;
public readIO(String file) {
inputFile = file;
elements = new ElemList ();
node = new NodeList();
try{
FileReader read=new FileReader(inputFile);
BufferedReader In = new BufferedReader(read);
String line = new String();
String[] ar;
while ((line = In.readLine()) != null)
{
ar = line.split("/");
Elem temp1 = node.CheckList(ar[0]);
Elem temp2 = node.CheckList(ar[1]);
newElem temp = new newElem(temp1,temp2,Integer.parseInt(ar[2]));
elements.insertFirst(temp);
}
}
catch(IOException e)
{
if (e instanceof FileNotFoundException)
{
System.out.println("Input file not found: " + inputFile);
}
else System.out.println("read error!");
System.exit(-1);
};
}
public NodeList get_Node(){return node;}
public ElemList get_List(){ return elements; }
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -