com.smallx.xml.infoset.util
Class EmptySource

java.lang.Object
  extended bycom.smallx.xml.infoset.util.EmptySource
All Implemented Interfaces:
ItemSource
Direct Known Subclasses:
DocumentSource, ItemQueue

public class EmptySource
extends java.lang.Object
implements ItemSource


Constructor Summary
EmptySource()
          Creates a new instance of EmptySource
 
Method Summary
 void copyTo(ItemDestination dest)
           
 void flush(boolean all)
          Flushs the items from the source.
 Item receive()
          Called when a infoset item is generated by a source.
 Element seek(Name name)
          Seeks to a particular element at the current level.
 Item seekByType(byte type)
          The type to seek to (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptySource

public EmptySource()
Creates a new instance of EmptySource

Method Detail

receive

public Item receive()
             throws XMLException
Description copied from interface: ItemSource
Called when a infoset item is generated by a source.

Specified by:
receive in interface ItemSource
Returns:
A boolean value indicating that addition items are wanted by the implementing object.
Throws:
XMLException

flush

public void flush(boolean all)
           throws XMLException
Description copied from interface: ItemSource
Flushs the items from the source.

Specified by:
flush in interface ItemSource
Parameters:
all - If true, all the items to the end of the document will be flushed. Otherwise, just the current level's children will be flushed.
Throws:
XMLException

seek

public Element seek(Name name)
             throws XMLException
Description copied from interface: ItemSource
Seeks to a particular element at the current level.

Specified by:
seek in interface ItemSource
Parameters:
name - The name of the element.
Throws:
XMLException

seekByType

public Item seekByType(byte type)
                throws XMLException
Description copied from interface: ItemSource
The type to seek to (e.g. Element.TYPE).

Specified by:
seekByType in interface ItemSource
Parameters:
type - The type code to use for the seek.
Returns:
An item or null for not found.
Throws:
XMLException - Thrown when there is an implementation error.

copyTo

public void copyTo(ItemDestination dest)
            throws XMLException
Specified by:
copyTo in interface ItemSource
Throws:
XMLException