Package org.apache.cocoon.environment

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


                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

            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

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.