org.apache.openjpa.lib.meta
Class ResourceMetaDataIterator

java.lang.Object
  extended by org.apache.openjpa.lib.meta.ResourceMetaDataIterator
All Implemented Interfaces:
MetaDataIterator, Closeable

public class ResourceMetaDataIterator
extends Object
implements MetaDataIterator

Iterator over a given metadata resource.

Author:
Abe White

Constructor Summary
ResourceMetaDataIterator(String rsrc)
          Constructor; supply the resource to parse.
ResourceMetaDataIterator(String rsrc, ClassLoader loader)
          Constructor; supply the resource to parse.
 
Method Summary
 void close()
          Close the resources used by this iterator.
 File getFile()
          Return the last-iterated metadata resource content as a file, or null if not an extant file.
 InputStream getInputStream()
          Return the last-iterated metadata resource content as a stream.
 boolean hasNext()
          Return whether there is another resource to iterate over.
 Object next()
          Return the next metadata resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceMetaDataIterator

public ResourceMetaDataIterator(String rsrc)
                         throws IOException
Constructor; supply the resource to parse.

Throws:
IOException

ResourceMetaDataIterator

public ResourceMetaDataIterator(String rsrc,
                                ClassLoader loader)
                         throws IOException
Constructor; supply the resource to parse.

Throws:
IOException
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: MetaDataIterator
Return whether there is another resource to iterate over.

Specified by:
hasNext in interface MetaDataIterator

next

public Object next()
Description copied from interface: MetaDataIterator
Return the next metadata resource.

Specified by:
next in interface MetaDataIterator

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: MetaDataIterator
Return the last-iterated metadata resource content as a stream.

Specified by:
getInputStream in interface MetaDataIterator
Throws:
IOException

getFile

public File getFile()
             throws IOException
Description copied from interface: MetaDataIterator
Return the last-iterated metadata resource content as a file, or null if not an extant file.

Specified by:
getFile in interface MetaDataIterator
Throws:
IOException

close

public void close()
Description copied from interface: MetaDataIterator
Close the resources used by this iterator.

Specified by:
close in interface MetaDataIterator
Specified by:
close in interface Closeable


Copyright © 2006 Apache Software Foundation. All Rights Reserved.