org.archive.wayback.util
Class WrappedCloseableIterator<E>

java.lang.Object
  extended by org.archive.wayback.util.WrappedCloseableIterator<E>
All Implemented Interfaces:
java.io.Closeable, java.util.Iterator<E>, CloseableIterator<E>

public class WrappedCloseableIterator<E>
extends java.lang.Object
implements CloseableIterator<E>

Simple wrapper around a normal Iterator which allows use of the close().

Version:
$Date$, $Revision$
Author:
brad

Constructor Summary
WrappedCloseableIterator(java.util.Iterator<E> inner)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 E next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrappedCloseableIterator

public WrappedCloseableIterator(java.util.Iterator<E> inner)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException


Copyright © 2005-2009 Internet Archive. All Rights Reserved.