Codota Logo
JarIterator
Code IndexAdd Codota to your IDE (free)

How to use
JarIterator
in
org.scannotation.archiveiterator

Best Java code snippets using org.scannotation.archiveiterator.JarIterator (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: banq/jdonframework

public static StreamIterator create(URL url, Filter filter) throws IOException {
  String urlString = url.toString();
  if (urlString.endsWith("!/")) {
    urlString = urlString.substring(4);
    urlString = urlString.substring(0, urlString.length() - 2);
    url = new URL(urlString);
  }
  if (!urlString.endsWith("/")) {
    return new JarIterator(url.openStream(), filter);
  } else {
    DirectoryIteratorFactory factory = registry.get(url.getProtocol());
    if (factory == null)
      throw new IOException("Unable to scan directory of protocol: " + url.getProtocol());
    return factory.create(url, filter);
  }
}
origin: net.sf.scannotation/scannotation

public InputStream next()
{
 if (closed || (next == null && !initial)) return null;
 setNext();
 if (next == null) return null;
 return new InputStreamWrapper(jar);
}
origin: net.sf.scannotation/scannotation

private void setNext()
{
 initial = true;
 try
 {
   if (next != null) jar.closeEntry();
   next = null;
   do
   {
    next = jar.getNextJarEntry();
   } while (next != null && (next.isDirectory() || (filter == null || !filter.accepts(next.getName()))));
   if (next == null)
   {
    close();
   }
 }
 catch (IOException e)
 {
   throw new RuntimeException("failed to browse jar", e);
 }
}
origin: de.juplo/scannotation

public InputStream next()
{
 if (closed || (next == null && !initial)) return null;
 setNext();
 if (next == null) return null;
 return new InputStreamWrapper(jar);
}
origin: de.juplo/scannotation

private void setNext()
{
 initial = true;
 try
 {
   if (next != null) jar.closeEntry();
   next = null;
   do
   {
    next = jar.getNextJarEntry();
   } while (next != null && (next.isDirectory() || (filter == null || !filter.accepts(next.getName()))));
   if (next == null)
   {
    close();
   }
 }
 catch (IOException e)
 {
   throw new RuntimeException("failed to browse jar", e);
 }
}
origin: net.sf.scannotation/scannotation

  public StreamIterator create(URL url, Filter filter) throws IOException
  {
   File f = new File(url.getPath());
   if (f.isDirectory())
   {
     return new FileIterator(f, filter);
   }
   else
   {
     return new JarIterator(url.openStream(), filter);
   }
  }
}
origin: net.sf.scannotation/scannotation

  public static StreamIterator create(URL url, Filter filter) throws IOException
  {
   String urlString = url.toString();
   if (urlString.endsWith("!/"))
   {
     urlString = urlString.substring(4);
     urlString = urlString.substring(0, urlString.length() - 2);
     url = new URL(urlString);
   }


   if (!urlString.endsWith("/"))
   {
     return new JarIterator(url.openStream(), filter);
   }
   else
   {
     DirectoryIteratorFactory factory = registry.get(url.getProtocol());
     if (factory == null) throw new IOException("Unable to scan directory of protocol: " + url.getProtocol());
     return factory.create(url, filter);
   }
  }
}
origin: de.juplo/scannotation

  public static StreamIterator create(URL url, Filter filter) throws IOException
  {
   String urlString = url.toString();
   if (urlString.endsWith("!/"))
   {
     urlString = urlString.substring(4);
     urlString = urlString.substring(0, urlString.length() - 2);
     url = new URL(urlString);
   }


   if (!urlString.endsWith("/"))
   {
     return new JarIterator(url.openStream(), filter);
   }
   else
   {
     DirectoryIteratorFactory factory = registry.get(url.getProtocol());
     if (factory == null) throw new IOException("Unable to scan directory of protocol: " + url.getProtocol());
     return factory.create(url, filter);
   }
  }
}
origin: de.juplo/scannotation

  public StreamIterator create(URL url, Filter filter) throws IOException
  {
    // See http://weblogs.java.net/blog/2007/04/25/how-convert-javaneturl-javaiofile
    File f;
    try
    {
      f = new File(url.toURI());
    }
    catch (URISyntaxException e)
    {
      f = new File(url.getPath());
    }

    if (f.isDirectory())
   {
     return new FileIterator(f, filter);
   }
   else
   {
     return new JarIterator(url.openStream(), filter);
   }
  }
}
org.scannotation.archiveiteratorJarIterator

Most used methods

  • <init>
  • close
  • setNext

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now