summaryrefslogtreecommitdiff
path: root/bdb/java/src/com/sleepycat/db/DbMultipleRecnoDataIterator.java
diff options
context:
space:
mode:
Diffstat (limited to 'bdb/java/src/com/sleepycat/db/DbMultipleRecnoDataIterator.java')
-rw-r--r--bdb/java/src/com/sleepycat/db/DbMultipleRecnoDataIterator.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/bdb/java/src/com/sleepycat/db/DbMultipleRecnoDataIterator.java b/bdb/java/src/com/sleepycat/db/DbMultipleRecnoDataIterator.java
new file mode 100644
index 00000000000..a4a578ed170
--- /dev/null
+++ b/bdb/java/src/com/sleepycat/db/DbMultipleRecnoDataIterator.java
@@ -0,0 +1,51 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2001-2002
+ * Sleepycat Software. All rights reserved.
+ *
+ * $Id: DbMultipleRecnoDataIterator.java,v 1.5 2002/01/11 15:52:39 bostic Exp $
+ */
+
+package com.sleepycat.db;
+
+/**
+ *
+ * @author David M. Krinsky
+ */
+public class DbMultipleRecnoDataIterator extends DbMultipleIterator
+{
+ // public methods
+ public DbMultipleRecnoDataIterator(Dbt data)
+ {
+ super(data);
+ }
+
+ public boolean next(Dbt key, Dbt data)
+ {
+ int keyoff = DbUtil.array2int(buf, pos);
+
+ // crack out the key offset and the data offset and length.
+ if (keyoff < 0) {
+ return (false);
+ }
+
+ pos -= int32sz;
+ int dataoff = DbUtil.array2int(buf, pos);
+
+ pos -= int32sz;
+ int datasz = DbUtil.array2int(buf, pos);
+
+ pos -= int32sz;
+
+ key.set_recno_key_from_buffer(buf, keyoff);
+
+ data.set_data(buf);
+ data.set_size(datasz);
+ data.set_offset(dataoff);
+
+ return (true);
+ }
+}
+
+// end of DbMultipleRecnoDataIterator.java