Examples of PostInputStream


Examples of org.apache.cocoon.util.PostInputStream

                contentType.startsWith("text/xml") ||
                contentType.startsWith("application/xml")) {

                int len = request.getContentLength();
                if (len > 0) {
                    requestStream = new PostInputStream(request.getInputStream(), len);
                } else {
                throw new IOException("getContentLen() == 0");
                }
            } else {
                throw new IOException("Unexpected getContentType(): " + request.getContentType());
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                    contentType.startsWith("text/xml") ||
                    contentType.startsWith("application/xml")) {

                len = request.getContentLength();
                if (len > 0) {
                        PostInputStream anStream = new PostInputStream(request.getInputStream(), len);
                        inputSource = new InputSource(anStream);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

            return null;
        }

        int length = httpReq.getContentLength();
        PostInputStream reqContent = new PostInputStream(httpReq.getInputStream(), length);

        // construct DOM document from the request contents
        DOMParser parser = (DOMParser) this.manager.lookup(DOMParser.ROLE);
        InputSource saxSource = new InputSource(reqContent);
        Document requestDoc = parser.parseDocument(saxSource);

        // get the root element (should be "request") and its attributes ---> FixMe: Add error handling
        Element root = requestDoc.getDocumentElement();
        getLogger().debug(".act(): Root element (should be 'request'): " + root.getTagName());

        String reqId = root.getAttribute("id");
        getLogger().debug(".act(): Request ID: " + reqId);

        String reqType = root.getAttribute("type");
        getLogger().debug(".act(): Request Type: " + reqType);

        // get the first child element for root element (should be "data") and its attributes ---> FixMe: Add error handling
        Element data = (Element) root.getFirstChild();
        getLogger().debug(".act(): first child element (should be 'data'): " + data.getTagName());

        String reqFile = data.getAttribute("id");
        getLogger().debug(".act(): Requested File: " + reqFile);

        String fileType = data.getAttribute("type");
        getLogger().debug(".act(): Requested File's Type: " + fileType);

        // close the input stream
        reqContent.close();

        // Define Files
        File tempFileDir =
            new File(sitemapPath + relRootDirs.get("temp") + "/" + relRootDirs.get(fileType));
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                    contentType.startsWith("text/xml") ||
                    contentType.startsWith("application/xml")) {

                len = request.getContentLength();
                if (len > 0) {
                        PostInputStream anStream = new PostInputStream(request.getInputStream(), len);
                        inputSource = new InputSource(anStream);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                    contentType.startsWith("text/xml") ||
                    contentType.startsWith("application/xml")) {
                len = request.getContentLength();

                if (len > 0) {
                        PostInputStream anStream = new PostInputStream(request.getInputStream(), len);
                        inputSource = new InputSource(anStream);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                contentType.startsWith("text/xml") ||
                contentType.startsWith("application/xml")) {

                int len = request.getContentLength();
                if (len > 0) {
                    requestStream = new PostInputStream(request.getInputStream(), len);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
                throw new IOException("Unexpected getContentType(): " + request.getContentType());
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                if ( httpRequest == null ) {
                    throw new ProcessingException("This feature is only available in an http environment.");
                }
                len = request.getContentLength();
                if (len > 0) {
                        PostInputStream anStream = new PostInputStream(httpRequest.getInputStream(), len);
                        inputSource = new InputSource(anStream);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                if ( httpRequest == null ) {
                    throw new ProcessingException("This functionality only works in an http environment.");
                }
                int len = request.getContentLength();
                if (len > 0) {
                    requestStream = new PostInputStream(httpRequest.getInputStream(), len);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
                throw new IOException("Unexpected getContentType(): " + request.getContentType());
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                if ( httpRequest == null ) {
                    throw new ProcessingException("This functionality only works in an http environment.");
                }
                int len = request.getContentLength();
                if (len > 0) {
                    requestStream = new PostInputStream(httpRequest.getInputStream(), len);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
                throw new IOException("Unexpected getContentType(): " + request.getContentType());
View Full Code Here

Examples of org.apache.cocoon.util.PostInputStream

                if ( httpRequest == null ) {
                    throw new ProcessingException("This functionality only works in an http environment.");
                }
                int len = request.getContentLength();
                if (len > 0) {
                    requestStream = new PostInputStream(httpRequest.getInputStream(), len);
                } else {
                    throw new IOException("getContentLen() == 0");
                }
            } else {
                throw new IOException("Unexpected getContentType(): " + request.getContentType());
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.