private void writeHeader(DataOutputBuffer out) throws IOException {
        writeMagic(out);
        if (version.intValue() == Version.v4.intValue()) {
            return;
        }

        if (version.intValue() >= Version.v1.intValue()) {
            // createtime = System.currentTimeMillis() + timeoffset;
            out.writeLong(createtime);
        }
        if (version.intValue() >= Version.v2.intValue()) {
            out.writeInt(this.getMsgCnt());
        }
    }
add msg
@param attr
@param data
@return
inlong-common/src/main/java/org/apache/inlong/common/msg/InLongMsg.java