buffer.add(page);
	public long add(byte[] value) throws ReadOnlyException {		if (value == null)			return -1;		final int valueLen = value.length;		// always append data to the end of the file		DOMPage page = getCurrentPage();		// does value fit into current data page?		if (page == null || page.len + 4 + valueLen > page.data.length) {			DOMPage newPage = new DOMPage();			if (page != null) {				DOMFilePageHeader ph = page.getPageHeader();				ph.setNextDataPage(newPage.getPageNum());				newPage.getPageHeader().setPrevDataPage(page.getPageNum());				page.setDirty(true);				//page.write();			}			page = newPage;			setCurrentPage(page);		}		// save tuple identifier		DOMFilePageHeader ph = page.getPageHeader();		short tid = ph.getNextTID();		ByteConversion.shortToByte(tid, page.data, page.len);		page.len += 2;		// save data length		ByteConversion.shortToByte((short) valueLen, page.data, page.len);		page.len += 2;		// save data		System.arraycopy(value, 0, page.data, page.len, valueLen);		page.len += valueLen;		ph.incRecordCount();		ph.setDataLength(page.len);		page.setDirty(true);		buffer.add(page);		// create pointer from pageNum and offset into page		final long p = createPointer((int) page.getPageNum(), tid);		return p;	}