00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 package com.sleepycat.db;
00011
00012 import com.sleepycat.db.internal.DbConstants;
00013
00014 public abstract class MultipleEntry extends DatabaseEntry {
00015 protected int pos;
00016
00017 protected MultipleEntry(final byte[] data, final int offset, final int size) {
00018 super(data, offset, size);
00019 setUserBuffer((data != null) ? (data.length - offset) : 0, true);
00020 this.flags |= DbConstants.DB_DBT_USERMEM;
00021 }
00022
00023 public void setUserBuffer(final int length, final boolean usermem) {
00024 if (!usermem)
00025 throw new IllegalArgumentException("User buffer required");
00026 super.setUserBuffer(length, usermem);
00027 }
00028 }