org.ow2.util.xmlconfig.source
Class InputStreamConfigurationSource

java.lang.Object
  extended by org.ow2.util.xmlconfig.source.InputStreamConfigurationSource
All Implemented Interfaces:
IConfigurationSource

public class InputStreamConfigurationSource
extends java.lang.Object
implements IConfigurationSource

This IConfigurationSource wraps an InputStream.

Author:
Guillaume Sauthier

Constructor Summary
InputStreamConfigurationSource(java.lang.String name, java.io.InputStream stream)
          Constructs a new IConfigurationSource based on InputStream.
 
Method Summary
 org.w3c.dom.Document getDocument(boolean validating)
          Parse the configuration source's content.
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamConfigurationSource

public InputStreamConfigurationSource(java.lang.String name,
                                      java.io.InputStream stream)
Constructs a new IConfigurationSource based on InputStream.

Parameters:
name - stream's name
stream - the stream to be parsed
Method Detail

getDocument

public org.w3c.dom.Document getDocument(boolean validating)
                                 throws org.ow2.util.xml.DocumentParserException
Parse the configuration source's content.

Specified by:
getDocument in interface IConfigurationSource
Parameters:
validating - is the parser validating ?
Returns:
the parsed Document
Throws:
org.ow2.util.xml.DocumentParserException - if the document cannot be parsed or is not valid.

getName

public java.lang.String getName()
Specified by:
getName in interface IConfigurationSource
Returns:
the name of the source (useful for textual representation).


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.