Package com.subhajit.common.contenturl

Examples of com.subhajit.common.contenturl.MemoryContent


                if (nextEntry == null) {
                    break;
                }
                if (nextEntry.getName().equals(name)) {
                    byte[] bytes = StreamUtils.readFully(zIn);
                    return new MemoryContent(bytes).toURL();
                }
            }
        } finally {
            if (zIn != null) {
                zIn.close();
View Full Code Here


            try {
                in = zipFile.getInputStream(new ZipEntry(name));
                if (in == null) {
                    return null;
                }
                MemoryContent content = new MemoryContent(StreamUtils
                        .readFully(in));
                return content.toURL();
            } finally {
                if (in != null) {
                    in.close();
                }
            }
View Full Code Here

                    }
                    if (innerEntry.isDirectory()) {
                        continue;
                    }
                    if (innerEntry.getName().equals(name)) {
                        return new MemoryContent(StreamUtils.readFully(zIn))
                                .toURL();
                    }
                }
                return null;
            } finally {
View Full Code Here

        if (bytes == null) {
            return null;
        }

        try {
            return new MemoryContent(bytes, name).toURL();
        } catch (MalformedURLException exc) {
            throw new RuntimeException(exc);
        }
    }
View Full Code Here

TOP

Related Classes of com.subhajit.common.contenturl.MemoryContent

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.