org.jdom.input
Interface Builder

All Known Implementing Classes:
AbstractBuilder

public interface Builder

Builder defines the standard interface for all builders. A Builder is responsible for taking an input (in various formats) and creating a Document object from that input. This interface defines the contract for the mandatory inputs that must be supported.

Version:
1.0
Author:
Brett McLaughlin, Jason Hunter

Method Summary
 Document build(java.io.File file)
           This builds a document from the supplied filename.
 Document build(java.io.InputStream in)
           This builds a document from the supplied input stream.
 Document build(java.net.URL url)
           This builds a document from the supplied URL.
 

Method Detail

build

public Document build(java.io.InputStream in)
               throws JDOMException

This builds a document from the supplied input stream. By default, validation does not occur.

Parameters:
in - InputStream to read from.
Returns:
Document - resultant Document object.
Throws:
JDOMException - when errors occur in parsing.

build

public Document build(java.io.File file)
               throws JDOMException

This builds a document from the supplied filename.

Parameters:
file - File to read from.
Returns:
Document - resultant Document object.
Throws:
JDOMException - when errors occur in parsing.

build

public Document build(java.net.URL url)
               throws JDOMException

This builds a document from the supplied URL.

Parameters:
url - URL to read from.
Returns:
Document - resultant Document object.
Throws:
JDOMException - when errors occur in parsing.


Copyright © 2000 Brett McLaughlin, Jason Hunter. All Rights Reserved.