public static String readFile(String fileName) throws IOException {
        StringBuilder sb = new StringBuilder();
        File file = new File(fileName);

        if (!file.exists()) {
            throw new RuntimeException("this file is not exist");
        }
        if (!file.isFile()) {
            throw new RuntimeException("this file name is not a file");
        }

        if (file.isFile() && file.exists()) {
            InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(file));
            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
            String result = null;
            while ((result = bufferedReader.readLine()) != null) {
                sb.append(result.toString()).append(System.getProperty("line.separator"));
            }
            inputStreamReader.close();
            bufferedReader.close();
        }
        return sb.toString();
    }