private void writeMagic(DataOutputBuffer out) throws IOException {
        if (version == Version.v1) {
            out.write(MAGIC1[0]);
            out.write(MAGIC1[1]);
        } else if (version == Version.v2) {
            out.write(MAGIC2[0]);
            out.write(MAGIC2[1]);
        } else if (version == Version.v3) {
            out.write(MAGIC3[0]);
            out.write(MAGIC3[1]);
        } else if (version == Version.v4) {
            out.write(MAGIC4[0]);
            out.write(MAGIC4[1]);
        } else {
            throw new IOException("wrong version : " + version.intValue());
        }
    }
add msg
@param attr
@param data
@return
inlong-common/src/main/java/org/apache/inlong/common/msg/InLongMsg.java