vlen = (short) ( ( data[pos + 2] & 0xff ) + ( ( data[pos + 3] & 0xff ) << 8 ) );
vlen = ByteConversion.byteToShort(data, pos + 2); if(vlen < 0) { LOG.warn("page = " + page.getPageNum() + "; pos = " + pos + "; vlen = " + vlen + "; tid = " + currentId + "; target = " + targetId); }
        public RecordPos findRecord(short targetId) {        	final int dlen = ph.getDataLength();        	short currentId;        	short vlen;        	RecordPos rec = null;        	byte flags;            for (int pos = 0; pos < dlen;) {            	currentId = (short) ( ( data[pos] & 0xff ) + ( ( data[pos + 1] & 0xff ) << 8 ) );//                currentId = ByteConversion.byteToShort(data, pos);                flags = ItemId.getFlags(currentId);                if (ItemId.matches(currentId, targetId)) {                	if ((flags & ItemId.LINK_FLAG) != 0) {                    	rec = new RecordPos(pos + 2, this, currentId);                    	rec.isLink = true;                    } else {                    	rec = new RecordPos(pos + 2, this, currentId);                    }                	break;                } else if ((flags & ItemId.LINK_FLAG) != 0){                	pos += 10;                } else {                	vlen = (short) ( ( data[pos + 2] & 0xff ) + ( ( data[pos + 3] & 0xff ) << 8 ) );//                    vlen = ByteConversion.byteToShort(data, pos + 2);                    if ((flags & ItemId.RELOCATED_FLAG) != 0) {                    	pos += vlen + 12;                    } else {                    	pos += vlen + 4;                    }                    if(vlen == OVERFLOW)                    	pos += 8;                }            }            return rec;        }