private void writeObjects(DataWriter out) throws IOException {
        long ofsMin = Long.MAX_VALUE;
        long ofsMax = Long.MIN_VALUE;

        for (SerializedObjectData data : serialized.objectData()) {
            ByteBuffer bb = data.buffer();
            bb.rewind();

            out.align(8);

            ofsMin = Math.min(ofsMin, out.position());
            ofsMax = Math.max(ofsMax, out.position() + bb.remaining());

            ObjectInfo info = data.info();
            info.offset(out.position() - serialized.header().dataOffset());
            info.length(bb.remaining());

            out.writeBuffer(bb);
        }

        DataBlock objectDataBlock = serialized.objectDataBlock();
        objectDataBlock.offset(ofsMin);
        objectDataBlock.endOffset(ofsMax);
        L.log(Level.FINER, "objectDataBlock: {0}", objectDataBlock);
    }
@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-core/src/main/java/info/ata4/junity/serialize/SerializedFileWriter.java