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

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

public class WrappedCloseableIterator<E>
extends Object
implements CloseableIterator<E>

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

Version:
$Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
Author:
brad

Constructor Summary
WrappedCloseableIterator(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(Iterator<E> inner)
Method Detail

hasNext

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

next

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

remove

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

close

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


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