1 package org.scannotation.archiveiterator;
4 import java.io.IOException;
5 import java.net.URISyntaxException;
9 * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
10 * @version $Revision: 1 $
12 public class FileProtocolIteratorFactory implements DirectoryIteratorFactory
15 public StreamIterator create(URL url, Filter filter) throws IOException
17 // See http://weblogs.java.net/blog/2007/04/25/how-convert-javaneturl-javaiofile
21 f = new File(url.toURI());
23 catch (URISyntaxException e)
25 f = new File(url.getPath());
30 return new FileIterator(f, filter);
34 return new JarIterator(url.openStream(), filter);