blob: a4a578ed1702fde7acf34e7352a4be893d774e0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
|