public void remove(long p) { RecordPos rec = findValuePosition(p); DOMFilePageHeader ph = rec.page.getPageHeader(); short l = ByteConversion.byteToShort(rec.page.data, rec.offset); int end = rec.offset + 2 + l; int len = ph.getDataLength();  System.arraycopy( rec.page.data, end, rec.page.data, rec.offset - 2, len - end); ph.setDirty(true); len = len - l - 4; ph.setDataLength(len); rec.page.len = len; rec.page.setDirty(true); ph.decRecordCount(); if (ph.getRecordCount() == 0) { buffer.remove(rec.page); long np = ph.getNextDataPage(); if(ph.getPrevDataPage() > -1) { DOMPage prev = getCurrentPage(ph.getPrevDataPage()); prev.getPageHeader().setNextDataPage(np); prev.setDirty(true); buffer.add(prev); } try { ph.setNextDataPage(-1); ph.setDataLength(0); ph.setDataLength(0);  ph.setRecordCount((short) 0); unlinkPages(rec.page.page); } catch (IOException ioe) { LOG.warn(ioe); } rec.page = null; } else buffer.add(rec.page);
public void remove(Value key) { try { long p = findValue(key); if(p == KEY_NOT_FOUND) return; remove(key, p); } catch (BTreeException bte) { LOG.debug(bte); } catch (IOException ioe) { LOG.debug(ioe); }
	public void remove(long p) {		RecordPos rec = findValuePosition(p);		DOMFilePageHeader ph = rec.page.getPageHeader();		short l = ByteConversion.byteToShort(rec.page.data, rec.offset);		int end = rec.offset + 2 + l;		int len = ph.getDataLength();		// remove old value		System.arraycopy(			rec.page.data,			end,			rec.page.data,			rec.offset - 2,			len - end);		ph.setDirty(true);		len = len - l - 4;		ph.setDataLength(len);		rec.page.len = len;		rec.page.setDirty(true);		ph.decRecordCount();		if (ph.getRecordCount() == 0) {			buffer.remove(rec.page);			long np = ph.getNextDataPage();			if(ph.getPrevDataPage() > -1) {				DOMPage prev = getCurrentPage(ph.getPrevDataPage());				prev.getPageHeader().setNextDataPage(np);				prev.setDirty(true);				buffer.add(prev);			}			try {				ph.setNextDataPage(-1);				ph.setDataLength(0);				ph.setDataLength(0);				//ph.setNextTID((short)0);				ph.setRecordCount((short) 0);				unlinkPages(rec.page.page);			} catch (IOException ioe) {				LOG.warn(ioe);			}			rec.page = null;		} else			buffer.add(rec.page);	}