Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.html
Class Include

    java.lang.Object
      org.mortbay.html.Element
          org.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 1.6 2005/08/13 00:01:23 gregwilkins Exp $
Author:
  Greg Wilkins
See Also:
  `Element`

Field Summary

Fields inherited from class org.mortbay.html.Element
`ALIGN, attributeMap, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, noAttributes, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH`

Constructor Summary
`Include(File file)` Constructor.
`Include(InputStream in)` Constructor.
`Include(Reader in)` Constructor.
`Include(String fileName)` Constructor.
`Include(String directory, String fileName)` Constructor.
`Include(URL url)` Constructor.

Method Summary
`void` | `write(Writer out)` Write element to a Writer.

Methods inherited from class org.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(String directory,
                   String fileName)
            throws IOException

  Constructor. Include file

  Parameters:
    `directory` - Directory name
    `fileName` - file name
  Throws:
    `IOException` - File not found

### Include

    public Include(String fileName)
            throws IOException

  Constructor. Include file.

  Parameters:
    `fileName` - Filename
  Throws:
    `IOException` - File not found

### Include

    public Include(File file)
            throws IOException

  Constructor. Include file.

  Parameters:
    `file` - file
  Throws:
    `IOException` - File not found

### Include

    public Include(InputStream in)
            throws 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:
    `IOException`

### Include

    public Include(URL url)
            throws IOException

  Constructor. Include contents of a URL. 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:
    `url` - the URL to read from.
  Throws:
    `IOException`

### Include

    public Include(Reader in)
            throws IOException

  Constructor. Include Reader.

  Parameters:
    `in` - reader
  Throws:
    `IOException`

Method Detail

### write

    public void write(Writer out)
               throws 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.

  Specified by:
    `write` in class `Element`
  Parameters:
    `out` - Writer to write the element to.
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.