code: public static String readTxt(String path)
      {
          if (path == null) return null;
          try
          {
              InputStream in = IOAdapter == null ? new FileInputStream(path) :
                      IOAdapter.open(path);
              byte[] fileContent = new byte[in.available()];
              int read = readBytesFromOtherInputStream(in, fileContent);
              in.close();
              // 处理 UTF-8 BOM
              if (read >= 3 && fileContent[0] == -17 && fileContent[1] == -69 && fileContent[2] == -65)
                  return new String(fileContent, 3, fileContent.length - 3, Charset.forName("UTF-8"));
              return new String(fileContent, Charset.forName("UTF-8"));
          }
          catch (FileNotFoundException e)
          {
              logger.warning("找不到" + path + e);
              return null;
          }
          catch (IOException e)
          {
              logger.warning("读取" + path + "发生IO异常" + e);
              return null;
          }
      }
docs: 一次性读入纯文本
  
  @param path
  @return