public static <T>ByteString serialize(final String templateName,T object){
  StringWriter templateResults=new StringWriter();
  try {
    final Template template=configuration.getTemplate(templateName);
    template.process(object,templateResults);
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
  return ByteString.encodeUtf8(templateResults.toString());
}

public static < T > ByteString serialize ( final String templateName , T object ) { StringWriter templateResults = new StringWriter ( ) ; try { final Template template = configuration . getTemplate ( templateName ) ; template . process ( object , templateResults ) ; } catch ( Exception e ) { throw Throwables . propagate ( e ) ; } return ByteString . encodeUtf8 ( templateResults . toString ( ) ) ; }
call the template engine and return the result .
