108 |
protected File dbDir; |
protected File dbDir; |
109 |
|
|
110 |
protected DirDB(String indexTypeURI) throws IOException { |
protected DirDB(String indexTypeURI) throws IOException { |
111 |
|
if(dir == null) throw new Error("Directory not initialized"); |
112 |
|
|
113 |
byte[] ascii = indexTypeURI.getBytes("US-ASCII"); |
byte[] ascii = indexTypeURI.getBytes("US-ASCII"); |
114 |
String hex = HexUtil.byteArrToHex(ascii); |
String hex = HexUtil.byteArrToHex(ascii); |
115 |
dbDir = new File(dir, "idx_"+hex); |
dbDir = new File(dir, "idx_"+hex); |
159 |
os.write((byte)'\n'); |
os.write((byte)'\n'); |
160 |
os.close(); |
os.close(); |
161 |
} |
} |
162 |
|
|
163 |
|
public String toString() { |
164 |
|
return "<DirDB '"+dbDir+"'>"; |
165 |
|
} |
166 |
} |
} |
167 |
|
|
168 |
/** Create a new DirPool. |
/** Create a new DirPool. |