public HtmlEntry(Dictionary dictionary, RandomAccessFile raf, final int index) throws IOException {
super(dictionary, raf, index);
title = raf.readUTF();
public HtmlEntry(Dictionary dictionary, RandomAccessFile raf, final int index) throws IOException {
super(dictionary, raf, index);
title = raf.readUTF();
- final boolean compressed = raf.readBoolean();
- final int length = raf.readInt();
- final byte[] bytes = new byte[length];
- raf.readFully(bytes);
+
+ final byte[] bytes = new byte[raf.readInt()];
+ final byte[] zipBytes = new byte[raf.readInt()];
+ raf.read(zipBytes);
+ StringUtil.unzipFully(zipBytes, bytes);
html = new String(bytes, "UTF-8");
}
@Override
public void write(RandomAccessFile raf) throws IOException {
super.write(raf);
raf.writeUTF(title);
html = new String(bytes, "UTF-8");
}
@Override
public void write(RandomAccessFile raf) throws IOException {
super.write(raf);
raf.writeUTF(title);