com.windgazer.util.io.taglib
Class FileContentTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.windgazer.util.io.taglib.FileAttributeTag
              |
              +--com.windgazer.util.io.taglib.FileContentTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
HtmlMetaTag, HtmlTagTag

public class FileContentTag
extends FileAttributeTag

FileContentTag is the base for creating short-coded content-tags.
Content tags in this context are tags that print a string representing part of the content of a file.

Version:
1.1
Author:
Martin 'Kemanorel' Reurings
See Also:
FileAttributeTag, Serialized Form

Field Summary
protected  int myBufferSize
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FileContentTag()
           
 
Method Summary
 int doEndTag()
          Implementation of the BodyTagSupport Class.
 java.lang.String getTagPrintString(java.io.File myFile)
          Return the value of some content.
 void setBufferSize(int inBufferSize)
           
 
Methods inherited from class com.windgazer.util.io.taglib.FileAttributeTag
doStartTag
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myBufferSize

protected int myBufferSize
Constructor Detail

FileContentTag

public FileContentTag()
Method Detail

setBufferSize

public void setBufferSize(int inBufferSize)

getTagPrintString

public java.lang.String getTagPrintString(java.io.File myFile)
                                   throws java.io.IOException
Return the value of some content.
This method is called by doStartTag and must be implemented to return a value for a defined portion of content.

Specified by:
getTagPrintString in class FileAttributeTag
Parameters:
myFile - The String representing the content of the File returned by the surrounding FileProvider.
Returns:
A String containing the value of some content.
java.io.IOException
See Also:
FileAttributeTag.doStartTag()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Implementation of the BodyTagSupport Class. Resets some of the information, stored in this tag, to their default values.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
super.doEndTag()
javax.servlet.jsp.JspException


Copyright © 2003 Windgazer Design. All Rights Reserved.