raf.seek(rafSources.getEndOffset());
pairEntries = CachingList.create(
- RAFList.create(raf, new PairEntry.Serializer(this), raf.getFilePointer(), dictFileVersion, dictFileVersion >= 7 ? 64 : 1, dictFileVersion >= 7),
+ RAFList.create(raf, new PairEntry.Serializer(this), raf.getFilePointer(), dictFileVersion),
CACHE_SIZE);
textEntries = CachingList.create(
RAFList.create(raf, new TextEntry.Serializer(this), raf.getFilePointer(), dictFileVersion),
CACHE_SIZE);
if (dictFileVersion >= 5) {
htmlEntries = CachingList.create(
- RAFList.create(raf, new HtmlEntry.Serializer(this), raf.getFilePointer(), dictFileVersion, dictFileVersion >= 7 ? 64 : 1, dictFileVersion >= 7),
+ RAFList.create(raf, new HtmlEntry.Serializer(this), raf.getFilePointer(), dictFileVersion),
CACHE_SIZE);
} else {
htmlEntries = Collections.emptyList();
}
if (dictFileVersion >= 7) {
- htmlData = RAFList.create(raf, new HtmlEntry.DataDeserializer(), raf.getFilePointer(), dictFileVersion, 16, true);
+ htmlData = RAFList.create(raf, new HtmlEntry.DataDeserializer(), raf.getFilePointer(), dictFileVersion);
} else {
htmlData = null;
}
RAFList.write(raf, pairEntries, new PairEntry.Serializer(this), 64, true);
System.out.println("text start: " + raf.getFilePointer());
RAFList.write(raf, textEntries, new TextEntry.Serializer(this));
- System.out.println("html start: " + raf.getFilePointer());
+ System.out.println("html index start: " + raf.getFilePointer());
RAFList.write(raf, htmlEntries, new HtmlEntry.Serializer(this), 64, true);
+ System.out.println("html data start: " + raf.getFilePointer());
assert htmlData == null;
- RAFList.write(raf, htmlEntries, new HtmlEntry.DataSerializer(), 16, true);
+ RAFList.write(raf, htmlEntries, new HtmlEntry.DataSerializer(), 128, true);
System.out.println("indices start: " + raf.getFilePointer());
RAFList.write(raf, indices, indexSerializer);
System.out.println("end: " + raf.getFilePointer());
final RAFListSerializer<HtmlEntry> htmlEntryIndexSerializer = new RAFListSerializer<HtmlEntry>() {
@Override
public void write(DataOutput raf, HtmlEntry t) throws IOException {
- if (t.index() == -1)
- throw new IndexOutOfBoundsException();
- raf.writeInt(t.index());
+ assert false;
}
@Override
raf.close();
return dictionaryInfo;
} catch (IOException e) {
- return null;
+ final DictionaryInfo dictionaryInfo = new DictionaryInfo();
+ dictionaryInfo.uncompressedFilename = file.getName();
+ dictionaryInfo.uncompressedBytes = file.length();
+ return dictionaryInfo;
} finally {
if (raf != null) {
try {