public byte[] load(File file) {
        try {
            if (!file.exists()) {
                // if parentDir not exist, create first
                File parentDir = file.getParentFile();
                if (parentDir == null) {
                    LOGGER.info("no parent dir, file:{}", file.getAbsolutePath());
                    return new byte[0];
                }
                if (!parentDir.exists()) {
                    boolean success = parentDir.mkdirs();
                    LOGGER.info("create dir {} result {}", parentDir, success);
                }
                file.createNewFile();
            }
            FileInputStream fis = new FileInputStream(file);
            BufferedInputStream inputStream = new BufferedInputStream(fis);
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            int len;
            byte[] buf = new byte[BUFFER_SIZE];
            while ((len = inputStream.read(buf)) != -1) {
                outputStream.write(buf, START_OFFSET, len);
            }
            inputStream.close();
            outputStream.close();
            return outputStream.toByteArray();
        } catch (Throwable ex) {
            LOGGER.error("load binlog offset error", ex);
            ThreadUtils.threadThrowableHandler(Thread.currentThread(), ex);
            return null;
        }
    }
Load the file contents from the specified path

@param file file
@return file content
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/snapshot/AbstractSnapshot.java