switch (mode) { case VALUES : pos = (long) pageFromPointer(pointer); tid = (short) offsetFromPointer(pointer); page = getDataPage(pos); pages.add(page); offset = findValuePosition(page, tid); data = page.getData(); l = ByteConversion.byteToInt(data, offset); v = new Value(data, offset + 4, l); v.setAddress(pointer); if (callback == null) values.add(v); else return callback.indexInfo(value, v); return true; case KEYS : value.setAddress(pointer); if (callback == null) values.add(value); else return callback.indexInfo(value, null); return true; case BOTH : Value[] entry = new Value[2]; entry[0] = value; pos = (long) pageFromPointer(pointer); tid = (short) offsetFromPointer(pointer); page = getDataPage(pos); pages.add(page); offset = findValuePosition(page, tid); data = page.getData(); l = ByteConversion.byteToInt(data, offset); v = new Value(data, offset + 4, l); v.setAddress(pointer); entry[1] = v; if (callback == null) values.add(entry); else return callback.indexInfo(value, v); return true;
try { switch (mode) { case VALUES : pos = (long) pageFromPointer(pointer); tid = (short) offsetFromPointer(pointer); page = getDataPage(pos); pages.add(page); offset = findValuePosition(page, tid); data = page.getData(); l = ByteConversion.byteToInt(data, offset); v = new Value(data, offset + 4, l); v.setAddress(pointer); if (callback == null) values.add(v); else return callback.indexInfo(value, v); return true; case KEYS : value.setAddress(pointer); if (callback == null) values.add(value); else return callback.indexInfo(value, null); return true; case BOTH : Value[] entry = new Value[2]; entry[0] = value; pos = (long) pageFromPointer(pointer); tid = (short) offsetFromPointer(pointer); page = getDataPage(pos); pages.add(page); offset = findValuePosition(page, tid); data = page.getData(); l = ByteConversion.byteToInt(data, offset); v = new Value(data, offset + 4, l); v.setAddress(pointer); entry[1] = v; if (callback == null) values.add(entry); else return callback.indexInfo(value, v); return true; } } catch (IOException e) { LOG.error(e.getMessage(), e);
		public boolean indexInfo(Value value, long pointer) {			long pos;			short tid;			DataPage page;			int offset;			int l;			Value v;			byte[] data;			switch (mode) {				case VALUES :					pos = (long) pageFromPointer(pointer);					tid = (short) offsetFromPointer(pointer);					page = getDataPage(pos);					pages.add(page);					offset = findValuePosition(page, tid);					data = page.getData();					l = ByteConversion.byteToInt(data, offset);					v = new Value(data, offset + 4, l);					v.setAddress(pointer);					if (callback == null)						values.add(v);					else						return callback.indexInfo(value, v);					return true;				case KEYS :					value.setAddress(pointer);					if (callback == null)						values.add(value);					else						return callback.indexInfo(value, null);					return true;				case BOTH :					Value[] entry = new Value[2];					entry[0] = value;					pos = (long) pageFromPointer(pointer);					tid = (short) offsetFromPointer(pointer);					page = getDataPage(pos);					pages.add(page);					offset = findValuePosition(page, tid);					data = page.getData();					l = ByteConversion.byteToInt(data, offset);					v = new Value(data, offset + 4, l);					v.setAddress(pointer);					entry[1] = v;					if (callback == null)						values.add(entry);					else						return callback.indexInfo(value, v);					return true;			}			return false;		}