Examples of StreamIterator


Examples of net.csdn.common.scan.component.StreamIterator

            };

            try {
                File urlPath = new File(url.getPath());
                if (!urlPath.exists() || urlPath.list().length == 0) return streamList;
                StreamIterator it = IteratorFactory.create(url, filter);

                InputStream stream;
                while ((stream = it.next()) != null) streamList.add(stream);
            } catch (IOException e) {
                throw e;
            }
        }
        return streamList;
View Full Code Here

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

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

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

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

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
TOP
Copyright © 2018 www.massapi.com. 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.