Package com.sun.jersey.core.util

Examples of com.sun.jersey.core.util.Closing


     * @return a {@link Closing}.
     * @throws IOException if there is an error opening the stream.
     */
    protected Closing closing(String jarUrlString) throws IOException {
        try {
            return new Closing(new URL(jarUrlString).openStream());
        } catch (MalformedURLException ex) {
            return new Closing(new FileInputStream(
                    UriComponent.decode(jarUrlString, UriComponent.Type.PATH)));
        }
    }
View Full Code Here


        for (final File child : root.listFiles()) {
            if (child.isDirectory()) {
                scanDirectory(child, cfl);
            } else if (cfl.onAccept(child.getName())) {
                try {
                    new Closing(new BufferedInputStream(new FileInputStream(child))).f(new Closing.Closure() {

                        public void f(final InputStream in) throws IOException {
                            cfl.onProcess(child.getName(), in);
                        }
                    });
View Full Code Here

TOP

Related Classes of com.sun.jersey.core.util.Closing

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.