org.apache.velocity.runtime.RuntimeSingleton.getContent()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中org.apache.velocity.runtime.RuntimeSingleton.getContent方法的一些代码示例,展示了RuntimeSingleton.getContent的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RuntimeSingleton.getContent方法的具体详情如下:
包路径:org.apache.velocity.runtime.RuntimeSingleton
类名称:RuntimeSingleton
方法名:getContent

RuntimeSingleton.getContent介绍

[英]Returns a static content resource from the resource manager. Uses the current value if INPUT_ENCODING as the character encoding.
[中]从资源管理器返回静态内容资源。使用当前值if INPUT_ENCODING作为字符编码。

代码示例

代码示例来源:origin: velocity/velocity-dep

/**
 * Returns a static content resource from the
 * resource manager.  Uses the current value
 * if INPUT_ENCODING as the character encoding.
 *
 * @param name Name of content resource to get
 * @return parsed ContentResource object ready for use
 * @throws ResourceNotFoundException if template not found
 *          from any available source.
 */
public static ContentResource getContent(String name)
  throws ResourceNotFoundException, ParseErrorException, Exception
{
  return RuntimeSingleton.getContent( name );
}

代码示例来源:origin: velocity/velocity-dep

/**
 * Returns a static content resource from the
 * resource manager.
 *
 * @param name Name of content resource to get
 * @param encoding Character encoding to use
 * @return parsed ContentResource object ready for use
 * @throws ResourceNotFoundException if template not found
 *          from any available source.
 */
public static ContentResource getContent( String name, String encoding )
  throws ResourceNotFoundException, ParseErrorException, Exception
{
  return RuntimeSingleton.getContent( name, encoding );
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity

/**
 * Returns a static content resource from the
 * resource manager.  Uses the current value
 * if INPUT_ENCODING as the character encoding.
 *
 * @param name Name of content resource to get
 * @return parsed ContentResource object ready for use
 * @throws ResourceNotFoundException if template not found
 *          from any available source.
 * @throws ParseErrorException if template cannot be parsed due
 *          to syntax (or other) error.
 * @throws Exception if an error occurs in template initialization
 */
public static ContentResource getContent(String name)
  throws ResourceNotFoundException, ParseErrorException, Exception
{
  return RuntimeSingleton.getContent( name );
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity

/**
 * Returns a static content resource from the
 * resource manager.
 *
 * @param name Name of content resource to get
 * @param encoding Character encoding to use
 * @return parsed ContentResource object ready for use
 * @throws ResourceNotFoundException if template not found
 *          from any available source.
 * @throws ParseErrorException if template cannot be parsed due
 *          to syntax (or other) error.
 * @throws Exception if an error occurs in template initialization
 */
public static ContentResource getContent( String name, String encoding )
  throws ResourceNotFoundException, ParseErrorException, Exception
{
  return RuntimeSingleton.getContent( name, encoding );
}

代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity

/**
 * Returns a static content resource from the
 * resource manager.  Uses the current value
 * if INPUT_ENCODING as the character encoding.
 *
 * @param name Name of content resource to get
 * @return parsed ContentResource object ready for use
 * @throws ResourceNotFoundException if template not found
 *          from any available source.
 * @throws ParseErrorException if template cannot be parsed due
 *          to syntax (or other) error.
 * @throws Exception if an error occurs in template initialization
 */
public static ContentResource getContent(String name)
  throws ResourceNotFoundException, ParseErrorException, Exception
{
  return RuntimeSingleton.getContent( name );
}

代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity

/**
 * Returns a static content resource from the
 * resource manager.
 *
 * @param name Name of content resource to get
 * @param encoding Character encoding to use
 * @return parsed ContentResource object ready for use
 * @throws ResourceNotFoundException if template not found
 *          from any available source.
 * @throws ParseErrorException if template cannot be parsed due
 *          to syntax (or other) error.
 * @throws Exception if an error occurs in template initialization
 */
public static ContentResource getContent( String name, String encoding )
  throws ResourceNotFoundException, ParseErrorException, Exception
{
  return RuntimeSingleton.getContent( name, encoding );
}

相关文章