Examples of streamContent()


Examples of com.google.gwt.thirdparty.org.apache.naming.resources.Resource.streamContent()

                entry.lastModified = attributes.getLastModified();

                if (resource != null) {

                    try {
                        binaryStream = resource.streamContent();
                    } catch (IOException e) {
                        return null;
                    }

                    // Register the full path for modification checking
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

                        //
                        // we have to read the JSP twice, once to figure out the content encoding
                        // the second time to read the actual content using the correct encoding
                        //
                        item.setEncoding(Utils.getJSPEncoding(jsp.streamContent()));
                    }
                    if (highlight) {
                        request.setAttribute("highlightedContent", Utils.highlightStream(jspName, jsp.streamContent(),
                                "xhtml", item.getEncoding()));
                    } else {
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

                        // the second time to read the actual content using the correct encoding
                        //
                        item.setEncoding(Utils.getJSPEncoding(jsp.streamContent()));
                    }
                    if (highlight) {
                        request.setAttribute("highlightedContent", Utils.highlightStream(jspName, jsp.streamContent(),
                                "xhtml", item.getEncoding()));
                    } else {
                        request.setAttribute("content", Utils.readStream(jsp.streamContent(), item.getEncoding()));
                    }
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

                    }
                    if (highlight) {
                        request.setAttribute("highlightedContent", Utils.highlightStream(jspName, jsp.streamContent(),
                                "xhtml", item.getEncoding()));
                    } else {
                        request.setAttribute("content", Utils.readStream(jsp.streamContent(), item.getEncoding()));
                    }

                } else {
                    logger.error(jspName + " does not exist");
                }
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

        }

        // Copy data in oldRevisionContent to contentFile
        if (oldResource != null) {
            BufferedInputStream bufOldRevStream =
                new BufferedInputStream(oldResource.streamContent(),
                                        BUFFER_SIZE);

            int numBytesRead;
            byte[] copyBuffer = new byte[BUFFER_SIZE];
            while ((numBytesRead = bufOldRevStream.read(copyBuffer)) != -1) {
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

                if (resource != null) {


                    try {
                        binaryStream = resource.streamContent();
                    } catch (IOException e) {
                        return null;
                    }

                    if (needConvert) {
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

                if (resource != null) {


                    try {
                        binaryStream = resource.streamContent();
                    } catch (IOException e) {
                        return null;
                    }

                    if (needConvert) {
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

                    log.debug(sm.getString("webappLoader.jarDeploy", filename,
                                     destFile.getAbsolutePath()));

                    Resource jarResource = (Resource) binding.getObject();
                    if (copyJars) {
                        if (!copy(jarResource.streamContent(),
                                  new FileOutputStream(destFile)))
                            continue;
                    }

                    try {
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

        }

        // Copy data in oldRevisionContent to contentFile
        if (oldResource != null) {
            BufferedInputStream bufOldRevStream =
                new BufferedInputStream(oldResource.streamContent(),
                                        BUFFER_SIZE);

            int numBytesRead;
            byte[] copyBuffer = new byte[BUFFER_SIZE];
            while ((numBytesRead = bufOldRevStream.read(copyBuffer)) != -1) {
View Full Code Here

Examples of org.apache.naming.resources.Resource.streamContent()

            NamingEnumeration wne = dirContext.listBindings("/META-INF/");
            Binding binding = (Binding) wne.nextElement();
            if (binding.getName().toUpperCase().equals("MANIFEST.MF")) {
                Resource resource = (Resource)dirContext.lookup
                                    ("/META-INF/" + binding.getName());
                inputStream = resource.streamContent();
                Manifest manifest = new Manifest(inputStream);
                inputStream.close();
                inputStream = null;
                ManifestResource mre = new ManifestResource
                    (sm.getString("extensionValidator.web-application-manifest"),
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.