import java.io.*; ///* /// ///辞書の元となるものです。 ///データーはデーター群をほじすることがてきます。 ///そして、アドレスを保持できます。 /// ///*/ class Index { IndexData head; public Index() { head = new IndexData('h'); } public IndexData IndexData() { return head; } public IndexData getChild() { return head.getChild(); } public IndexData getChild(int i) { return head.getChild(i); } public void add(String st,String adress,int index) { add(st, adress, index,head); } public boolean includeKeyword(String name,String keyword) { File dir = new File(name); File temp; for(int i= 0; i < keyword.length();i++) { if(false ==dir.exists()){return false;} dir = new File(dir,new String().valueOf(new Character(keyword.charAt(i)))); if(dir.exists()==false){return false;} } return true; } public IndexData searchIndexData(String str) { IndexData temp = head; for(int i= 0; i < str.length();i++) { temp = temp.search(str.charAt(i)); if(temp == null){return null;} } return temp; } public IndexData searchFile(String name ,String key) { RandomAccessFile fr = null; IndexData temp = new IndexData('h'); try { File fir = new File(name); fr = new RandomAccessFile(fir,"r"); temp.readFileHeader(fr); }catch(Exception e) { } long sum = 0; int num = 0; for(int i = 0;i