private void storeObjectToFile(Object storeObj, String configPath, String fileName) {
        FileOutputStream fos = null;
        ObjectOutputStream p;
        try {
            File file;
            if (configPath.lastIndexOf(File.separator) != configPath.length() - 1) {
                file = new File(configPath + File.separator + fileName + ".conf");
            } else {
                file = new File(configPath + fileName + ".conf");
            }
            logger.info("Store address is " + file.getAbsolutePath());
            if (!file.getParentFile().exists()) {
                file.getParentFile().mkdir();
            }
            if (!file.exists()) {
                file.createNewFile();
            }
            fos = new FileOutputStream(file);
            p = new ObjectOutputStream(fos);
            p.writeObject(storeObj);
            p.flush();
        } catch (Throwable e) {
            logger.warn("store " + fileName + " exception", e);
        } finally {
            if (fos != null) {
                try {
                    fos.close();
                } catch (Throwable e2) {
                    //
                }
            }
        }
    }
Write object data to specified file path

@param storeObj      the object to be stored
@param configPath    the stored file path
@param fileName      the stored file name
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliMetaDataBRU.java