Package org.apache.cocoon.environment

Examples of org.apache.cocoon.environment.Source.recycle()


            if (input != null) {
                input.toSAX(filter);
            }
        } finally {
            if (input != null) input.recycle();
            input = null;
        }

        builder.endElement("", "sunShine", "sunShine");
        builder.endDocument();
View Full Code Here


                child.normalize();
                root.removeChild(child);
                frag.appendChild(child);
            }
        } finally {
            if (input != null) input.recycle();
            input = null;
        }


        if (this.getLogger().isDebugEnabled() == true) {
View Full Code Here

                writer.write(xml);
                writer.flush();
                writer.close();
                writer = null;
            } finally {
                if (input != null) input.recycle();
                input = null;
            }

        } catch (IOException ioe) {
            throw new ProcessingException("saveXMLToFile: IOException: " + ioe, ioe);
View Full Code Here

                writer.write(content);
                writer.flush();
                writer.close();
                writer = null;
            } finally {
                if (input != null) input.recycle();
                input = null;
            }

        } catch (IOException ioe) {
            throw new ProcessingException("saveContentToFile: IOException: " + ioe, ioe);
View Full Code Here

        } catch (SAXException sax) {
            throw new ProcessingException("SAXException: " + sax, sax);
        } catch (IOException ioe) {
            throw new ProcessingException("IOException: " + ioe, ioe);
        } finally {
            if (input != null) input.recycle();
            input = null;
        }

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END streamXMLFromFile");
View Full Code Here

        Source input = null;
        try {
            input = this.getSource(uri, typeParameters, resourceParameters);
            input.toSAX(filter);
        } finally {
            if (input != null) input.recycle();
            input = null;
        }

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END streamXMLFromURI");
View Full Code Here

                    }
                }
            } while (available > 0);
            content = buffer.toString();
        } finally {
            if (input != null) input.recycle();
            input = null;
        }

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END getContentFromURI content="+content);
View Full Code Here

            fis.close();
            content = (data == null ? "" : new String(data));
        } catch (FileNotFoundException local) {
            throw new ResourceNotFoundException("File not found '" + filename + "'", local);
        } finally {
            if (input != null) input.recycle();
            input = null;
        }
        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END getContentFromFile content="+content);
        }
View Full Code Here

                } else {
                    this.resourceType = ResourceConnector.RESOURCE_TYPE_URI;
                    this.resourceIdentifier = identifier;
                }
            } finally {
                source.recycle();
            }
        } else {
            // check for relative cocoon:/ protocol
            if (identifier.startsWith("cocoon:/")
                && identifier.charAt("cocoon:/".length()) != '/') {
View Full Code Here

            } catch (SAXException se) {
                throw new IOException("SAXException: " + se);
            } catch (ProcessingException pe) {
                throw new IOException("ProcessingException: " + pe);
            } finally {
                if (redirectSource != null) redirectSource.recycle();
            }
        } else {
            Source redirectSource = null;
            try {
                redirectSource = this.resolve(newURL);
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.