com.mortbay.HTML
Class Include

java.lang.Object
  |
  +--com.mortbay.HTML.Element
        |
        +--com.mortbay.HTML.Include

public class Include
extends Element

Include File, InputStream or Reader Element

This Element includes another file. This class expects that the HTTP directory separator '/' will be used. This will be converted to the local directory separator.

Version:
$Id: Include.java,v 2.4 1999/10/09 15:07:25 gregw Exp $
Author:
Greg Wilkins
See Also:
Element

Fields inherited from class com.mortbay.HTML.Element
ALIGN, attributeMap, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, noAttributes, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH
 
Constructor Summary
Include(java.io.File file)
          Constructor.
Include(java.io.InputStream in)
          Constructor.
Include(java.io.Reader in)
          Constructor.
Include(java.lang.String fileName)
          Constructor.
Include(java.lang.String directory, java.lang.String fileName)
          Constructor.
 
Method Summary
 void write(java.io.Writer out)
          Write element to a Writer This abstract method is called by the Page or other containing Element to write the HTML for this element.
 
Methods inherited from class com.mortbay.HTML.Element
attribute, attribute, attribute, attributes, attributes, bgColor, bottom, center, color, cssClass, cssID, height, height, height, left, middle, right, setAttributesFrom, size, size, size, style, top, toString, width, width, width, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Include

public Include(java.lang.String directory,
               java.lang.String fileName)
        throws java.io.IOException
Constructor. Include file
Parameters:
directory - Directory name
fileName - file name
Throws:
java.io.IOException - File not found

Include

public Include(java.lang.String fileName)
        throws java.io.IOException
Constructor. Include file.
Parameters:
fileName - Filename
Throws:
java.io.IOException - File not found

Include

public Include(java.io.File file)
        throws java.io.IOException
Constructor. Include file.
Parameters:
file - file
Throws:
java.io.IOException - File not found

Include

public Include(java.io.InputStream in)
        throws java.io.IOException
Constructor. Include InputStream. Byte to character transformation is done assuming the default local character set. What this means is that on EBCDIC systems the included file is assumed to be in EBCDIC.
Parameters:
in - stream
Throws:
java.io.IOException -  

Include

public Include(java.io.Reader in)
        throws java.io.IOException
Constructor. Include Reader.
Parameters:
in - reader
Throws:
java.io.IOException -  
Method Detail

write

public void write(java.io.Writer out)
           throws java.io.IOException
Description copied from class: Element
Write element to a Writer This abstract method is called by the Page or other containing Element to write the HTML for this element. This must be implemented by the derived Element classes.
Overrides:
write in class Element
Tags copied from class: Element
Parameters:
out - Writer to write the element to.