Package org.scannotation.archiveiterator

Examples of org.scannotation.archiveiterator.StreamIterator


                return false;
            }
        };

        //X TODO drop URL and use native Strings as long as possible!
        StreamIterator it;
        String jarUrlPath = isJarUrl(urlPath);
        if (jarUrlPath != null)
        {
            it = new JarIterator((new URL(ensureCorrectUrlFormat(jarUrlPath))).openStream(), filter);
        }
        else
        {
            File f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
            if (!f.exists())
            {
                // try a fallback if the URL contains %20 -> spaces
                if (urlPath.contains("%20"))
                {
                    urlPath = urlPath.replaceAll("%20", " ");
                    f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
                }

            }
            it = new FileIterator(f, filter);
        }

        InputStream stream;
        while ((stream = it.next()) != null)
        {
            scanClass(stream);
        }
    }
View Full Code Here


                return false;
            }
        };

        //X TODO drop URL and use native Strings as long as possible!
        StreamIterator it;
        String jarUrlPath = isJarUrl(urlPath);
        if (jarUrlPath != null)
        {
            it = new JarIterator((new URL(ensureCorrectUrlFormat(jarUrlPath))).openStream(), filter);
        }
        else
        {
            File f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
            if (!f.exists())
            {
                // try a fallback if the URL contains %20 -> spaces
                if (urlPath.contains("%20"))
                {
                    urlPath = urlPath.replaceAll("%20", " ");
                    f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
                }

            }
            it = new FileIterator(f, filter);
        }

        InputStream stream;
        while ((stream = it.next()) != null)
        {
            scanClass(stream);
        }
    }
View Full Code Here

                return false;
            }
        };

        //X TODO drop URL and use native Strings as long as possible!
        StreamIterator it;
        String jarUrlPath = isJarUrl(urlPath);
        if (jarUrlPath != null)
        {
            it = new JarIterator((new URL(ensureCorrectUrlFormat(jarUrlPath))).openStream(), filter);
        }
        else
        {
            File f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
            if (!f.exists())
            {
                // try a fallback if the URL contains %20 -> spaces
                if (urlPath.contains("%20"))
                {
                    urlPath = urlPath.replaceAll("%20", " ");
                    f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
                }

            }
            it = new FileIterator(f, filter);
        }

        InputStream stream;
        while ((stream = it.next()) != null)
        {
            scanClass(stream);
        }
    }
View Full Code Here

                return false;
            }
        };

        //X TODO drop URL and use native Strings as long as possible!
        StreamIterator it;
        String jarUrlPath = isJarUrl(urlPath);
        if (jarUrlPath != null)
        {
            it = new JarIterator((new URL(ensureCorrectUrlFormat(jarUrlPath))).openStream(), filter);
        }
        else
        {
            File f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
            if (!f.exists())
            {
                // try a fallback if the URL contains %20 -> spaces
                if (urlPath.contains("%20"))
                {
                    urlPath = urlPath.replaceAll("%20", " ");
                    f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
                }

            }
            it = new FileIterator(f, filter);
        }

        InputStream stream;
        while ((stream = it.next()) != null)
        {
            scanClass(stream);
        }
    }
View Full Code Here

                return false;
            }
        };

        //X TODO drop URL and use native Strings as long as possible!
        StreamIterator it;
        String jarUrlPath = isJarUrl(urlPath);
        if (jarUrlPath != null)
        {
            it = new JarIterator((new URL(ensureCorrectUrlFormat(jarUrlPath))).openStream(), filter);
        }
        else
        {
            File f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
            if (!f.exists())
            {
                // try a fallback if the URL contains %20 -> spaces
                if (urlPath.contains("%20"))
                {
                    urlPath = urlPath.replaceAll("%20", " ");
                    f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() );
                }

            }
            it = new FileIterator(f, filter);
        }

        InputStream stream;
        while ((stream = it.next()) != null)
        {
            scanClass(stream);
        }
    }
View Full Code Here

TOP

Related Classes of org.scannotation.archiveiterator.StreamIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.