public String parse(File file,JSON m){
  try {
    Template template=getTemplate(file);
    if (template != null) {
      StringWriter w=new StringWriter();
      BufferedWriter writer=new BufferedWriter(w);
      template.merge(new VelocityContext(m),writer);
      writer.flush();
      writer.close();
      return w.toString();
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  return null;
}

public String parse ( File file , JSON m ) { try { Template template = getTemplate ( file ) ; if ( template != null ) { StringWriter w = new StringWriter ( ) ; BufferedWriter writer = new BufferedWriter ( w ) ; template . merge ( new VelocityContext ( m ) , writer ) ; writer . flush ( ) ; writer . close ( ) ; return w . toString ( ) ; } } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; } return null ; }
parse the file to string with the json
