Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdom.transform
Class JDOMSource.JDOMInputSource  view JDOMSource.JDOMInputSource download JDOMSource.JDOMInputSource.java

java.lang.Object
  extended byorg.xml.sax.InputSource
      extended byorg.jdom.transform.JDOMSource.JDOMInputSource
Enclosing class:
JDOMSource

private static class JDOMSource.JDOMInputSource
extends org.xml.sax.InputSource

A subclass of the SAX InputSource interface that wraps a JDOM Document.

This class is nested in JDOMSource as it is not intented to be used independently of its friend: DocumentReader.


Field Summary
private  java.lang.Object source
          The source as a JDOM document or a list of JDOM nodes.
 
Fields inherited from class org.xml.sax.InputSource
 
Constructor Summary
JDOMSource.JDOMInputSource(org.jdom.Document document)
          Builds a InputSource wrapping the specified JDOM Document.
JDOMSource.JDOMInputSource(java.util.List nodes)
          Builds a InputSource wrapping a list of JDOM nodes.
 
Method Summary
 java.io.Reader getCharacterStream()
          Gets the character stream for this input source.
 java.lang.Object getSource()
          Returns the source.
 void setCharacterStream(java.io.Reader characterStream)
          Sets the character stream for this input source.
 
Methods inherited from class org.xml.sax.InputSource
getByteStream, getEncoding, getPublicId, getSystemId, setByteStream, setEncoding, setPublicId, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

private java.lang.Object source
The source as a JDOM document or a list of JDOM nodes.

Constructor Detail

JDOMSource.JDOMInputSource

public JDOMSource.JDOMInputSource(org.jdom.Document document)
Builds a InputSource wrapping the specified JDOM Document.


JDOMSource.JDOMInputSource

public JDOMSource.JDOMInputSource(java.util.List nodes)
Builds a InputSource wrapping a list of JDOM nodes.

Method Detail

getSource

public java.lang.Object getSource()
Returns the source.


setCharacterStream

public void setCharacterStream(java.io.Reader characterStream)
                        throws java.lang.UnsupportedOperationException
Sets the character stream for this input source.

This implementation always throws an java.lang.UnsupportedOperationException as the only source stream supported is the source JDOM document.


getCharacterStream

public java.io.Reader getCharacterStream()
Gets the character stream for this input source.

Note that this method is only provided to make this InputSource implementation acceptable by any XML parser. As it generates an in-memory string representation of the JDOM document, it is quite inefficient from both speed and memory consumption points of view.