package com.qingyun.service.agent;

import java.io.BufferedReader;
import java.io.IOException;

/**
 * @Classname ResourceReadUtils
 * @Author dyh
 * @Date 2024/10/13 16:45
 */
public class ResourceReadUtils {

    public static String convert(BufferedReader reader) throws IOException {
        StringBuilder stringBuilder = new StringBuilder();
        String line;
        while ((line = reader.readLine()) != null) {
            stringBuilder.append(line);
            stringBuilder.append(System.lineSeparator()); // 保留换行符
        }
        return stringBuilder.toString();
    }

}
