org.apache.velocity.runtime.directive
Class InputBase

java.lang.Object
  extended by org.apache.velocity.runtime.directive.Directive
      extended by org.apache.velocity.runtime.directive.InputBase
All Implemented Interfaces:
Cloneable, DirectiveConstants
Direct Known Subclasses:
Include, Parse

public abstract class InputBase
extends Directive

Base class for directives which do input operations (e.g. #include(), #parse(), etc.).

Since:
1.4
Author:
Daniel Rall

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.directive.Directive
rsvc
 
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
BLOCK, LINE
 
Constructor Summary
InputBase()
           
 
Method Summary
protected  String getInputEncoding(InternalContextAdapter context)
          Decides the encoding used during input processing of this directive.
 
Methods inherited from class org.apache.velocity.runtime.directive.Directive
checkArgs, getColumn, getLine, getName, getScopeName, getTemplateName, getType, init, isScopeProvided, makeScope, postRender, preRender, render, setLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputBase

public InputBase()
Method Detail

getInputEncoding

protected String getInputEncoding(InternalContextAdapter context)
Decides the encoding used during input processing of this directive. Get the resource, and assume that we use the encoding of the current template the 'current resource' can be null if we are processing a stream....

Parameters:
context - The context to derive the default input encoding from.
Returns:
The encoding to use when processing this directive.


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.