public void loadDictionary()
{
if (LEAF_NODES != null && INTERNAL_NODES != null)
return;
Path path = Paths.get("./dictionary.dat");
try (DataInputStream bis = new DataInputStream(new ByteArrayInputStream(Files.readAllBytes(path))))
{
final short numIds = (short)((bis.readByte() & 0xFF) | bis.readByte() << 8);
this.LEAF_NODES = new short[numIds];
for (short n2 = 0; n2 < numIds; ++n2) {
this.LEAF_NODES[n2] = (short)(bis.readByte() << 8 | (short)(bis.readByte() & 0xFF));
}
this.INTERNAL_NODES = new short[numIds - 1][2];
for (short n3 = 0; n3 < numIds - 1; n3++) {
this.INTERNAL_NODES[n3][0] = (short)((bis.readByte() & 0xFF) | bis.readByte() << 8);
this.INTERNAL_NODES[n3][1] = (short)((bis.readByte() & 0xFF) | bis.readByte() << 8);
}
}
catch (IOException e)
{
_log.log(Level.SEVERE, "WARNING: The Server coud not load dictionary. Reason: "
+ e.getMessage(), e);
}
}