|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.util.LoadTextTag
public class LoadTextTag
A tag which loads text from a file or URI into a Jelly variable.
Field Summary | |
---|---|
private java.lang.String |
encoding
|
private java.io.File |
file
|
private static org.apache.commons.logging.Log |
log
The Log to which logging calls will be made. |
private java.lang.String |
uri
|
private java.lang.String |
var
|
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
LoadTextTag()
|
Method Summary | |
---|---|
void |
doTag(org.apache.commons.jelly.XMLOutput output)
|
java.lang.String |
getEncoding()
Returns the encoding set. |
java.io.File |
getFile()
Returns the file. |
java.lang.String |
getUri()
Returns the uri. |
java.lang.String |
getVar()
Returns the var. |
protected java.lang.String |
loadText(java.io.Reader reader)
Loads all the text from the given Reader |
void |
setEncoding(java.lang.String encoding)
Sets the encoding to use to read the file |
void |
setFile(java.io.File file)
Sets the file to be parsed as text |
void |
setUri(java.lang.String uri)
Sets the uri to be parsed as text. |
void |
setVar(java.lang.String var)
Sets the name of the variable which will be exported with the text value of the given file. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private java.lang.String var
private java.io.File file
private java.lang.String uri
private java.lang.String encoding
Constructor Detail |
---|
public LoadTextTag()
Method Detail |
---|
public void doTag(org.apache.commons.jelly.XMLOutput output) throws org.apache.commons.jelly.MissingAttributeException, org.apache.commons.jelly.JellyTagException
org.apache.commons.jelly.MissingAttributeException
org.apache.commons.jelly.JellyTagException
public void setVar(java.lang.String var)
public java.io.File getFile()
public java.lang.String getUri()
public java.lang.String getVar()
public void setFile(java.io.File file)
public void setEncoding(java.lang.String encoding)
public void setUri(java.lang.String uri)
public java.lang.String getEncoding()
setEncoding(String)
protected java.lang.String loadText(java.io.Reader reader) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |