- private LazyHtmlLoader(final DataInput inp, int version) throws IOException {
- raf = (RandomAccessFile)inp;
- if (version >= 7) {
- numBytes = -1;
- numZipBytes = StringUtil.readVarInt(raf);
- } else {
- numBytes = raf.readInt();
- numZipBytes = raf.readInt();
+ private LazyHtmlLoader(FileChannel ch, final DataInput inp, List<byte[]> data, int index) throws IOException {
+ this.data = data;
+ this.index = index;
+ if (data != null) {
+ this.raf = null;
+ this.ch = null;
+ this.offset = 0;
+ this.numBytes = -1;
+ this.numZipBytes = -1;
+ return;