org.glassfish.jersey.server.internal.scanning
Class JarFileScanner

java.lang.Object
  extended by org.glassfish.jersey.server.internal.scanning.JarFileScanner
All Implemented Interfaces:
java.util.Iterator<java.lang.String>, ResourceFinder

public final class JarFileScanner
extends java.lang.Object
implements ResourceFinder

A utility class that scans entries in jar files.

Author:
Paul Sandoz

Constructor Summary
JarFileScanner(java.io.InputStream inputStream, java.lang.String parent)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.String next()
           
 java.io.InputStream open()
          Open current resource.
 void remove()
          

This operation is not supported by ResourceFinder & throws UnsupportedOperationException when invoked.

 void reset()
          Reset the ResourceFinder instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarFileScanner

public JarFileScanner(java.io.InputStream inputStream,
                      java.lang.String parent)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

hasNext

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

next

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

remove

public void remove()
Description copied from interface: ResourceFinder

This operation is not supported by ResourceFinder & throws UnsupportedOperationException when invoked.

Specified by:
remove in interface java.util.Iterator<java.lang.String>
Specified by:
remove in interface ResourceFinder

open

public java.io.InputStream open()
Description copied from interface: ResourceFinder
Open current resource.

Specified by:
open in interface ResourceFinder
Returns:
input stream from which current resource can be loaded.

reset

public void reset()
Description copied from interface: ResourceFinder
Reset the ResourceFinder instance.

Upon calling this method the implementing class MUST reset its internal state to the initial state.

Specified by:
reset in interface ResourceFinder


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.