replacementsFile.writeShort(objIdWithRedirectionBit);//write new ID to replacements file
writeEntryLenForID(objId,objectBodyLength,replacementsFile);//write length of replacements file, could be bigger than actual object's data occupies
long newObjectBodyOffset = replacementsFile.getCursorOffset();
//return to write actual length of replacement entry
replacementsFile.seek(replacementLengthEntryOffset);
replacementsFile.writeLong(newObjectBodyOffset-newObjectIDOffset+objectBodyLength);
replacementsFile.seek(newObjectBodyOffset);//back to the header end
transactionFile.transferTo(objectBodyOffset, objectBodyLength, replacementsFile.getChannel());
transactionFile.seek(objectIDOffset);//return position in transaction file to the start of object(like it wasn't here)