} catch (IOException ioe) { ioe.printStackTrace();
	public long append(Value key, ByteArray value) throws ReadOnlyException {		if (key == null) {			LOG.debug("key is null");			return -1;		}		try {			try {				// check if key exists already				long p = findValue(key);				if (p == KEY_NOT_FOUND) {					// key does not exist:					p = storeValue(value);					addValue(key, p);					return p;				}				// key exists: get old data				final long pnum = (long) pageFromPointer(p);				final short tid = (short) offsetFromPointer(p);				final DataPage page = getDataPage(pnum);				if (page instanceof OverflowPage)					 ((OverflowPage) page).append(value);				else {					final int valueLen = value.size();					final byte[] data = page.getData();					final int offset = findValuePosition(page, tid);					final int l = ByteConversion.byteToInt(data, offset);					if (offset + 4 > data.length || offset < 0) {						LOG.error(							"wrong pointer (tid: "								+ tid								+ page.getPageInfo()								+ ") in file "								+ getFile().getName()								+ "; offset = "								+ offset);						return -1;					}					if (offset + 4 + l > data.length) {						LOG.error(							"found invalid data record ("								+ page.getPageInfo()								+ "): "								+ "length="								+ data.length								+ "; required="								+ (offset + 4 + l));						return -1;					}					final byte[] newData = new byte[l + valueLen];					System.arraycopy(data, offset + 4, newData, 0, l);					value.copyTo(newData, l);					p = update(p, page, key, new FixedByteArray(newData));				}				return p;			} catch (BTreeException bte) {				// key does not exist:				long p = storeValue(value);				addValue(key, p);				return p;			} catch (IOException ioe) {				ioe.printStackTrace();			}		} catch (IOException e) {			e.printStackTrace();			LOG.warn(e);		} catch (BTreeException bte) {			bte.printStackTrace();			LOG.warn(bte);		}		return -1;	}