code: public static boolean string2File(File file, String data) throws IOException {
          if (!file.getParentFile().exists()) {
              file.getParentFile().mkdirs();
          }
          FileWriter writer = null;
          try {
              writer = new FileWriter(file, false);
              writer.write(data);
          } finally {
              if (writer != null) {
                  writer.close();
              }
          }
          return true;
      }
docs: 字符流写文件 较快
  
  @param file 文件
  @param data 数据
  @return 操作是否成功
  @throws IOException 发送IO异常