Package org.apache.cocoon

Examples of org.apache.cocoon.CascadingIOException


            Source redirectSource = null;
            try {
                redirectSource = this.resolveURI(newURL);
                SourceUtil.parse( this.manager, redirectSource, ls);
            } catch (SourceException se) {
                throw new CascadingIOException("SourceException: " + se, se);
            } catch (SAXException se) {
                throw new CascadingIOException("SAXException: " + se, se);
            } catch (ProcessingException pe) {
                throw new CascadingIOException("ProcessingException: " + pe, pe);
            } finally {
                this.release( redirectSource );
            }
        } else {
            Source redirectSource = null;
            try {
                redirectSource = this.resolveURI(newURL);
                InputStream is = redirectSource.getInputStream();
                byte[] buffer = new byte[8192];
                int length = -1;

                while ((length = is.read(buffer)) > -1) {
                    this.outputStream.write(buffer, 0, length);
                }
            } catch (SourceException se) {
                throw new CascadingIOException("SourceException: " + se, se);
            } finally {
                this.release( redirectSource);
            }
        }
    }
View Full Code Here


            handler.setResult(new StreamResult(this.output));
            this.setContentHandler(handler);
            this.setLexicalHandler(handler);
       } catch (Exception e) {
            final String message = "Cannot set TextSerializer outputstream";
            throw new CascadingIOException(message, e);
        }
    }
View Full Code Here

            handler.setResult(new StreamResult(this.output));
            this.setContentHandler(handler);
            this.setLexicalHandler(handler);
        } catch (Exception e) {
            final String message = "Cannot set XMLSerializer outputstream";
            throw new CascadingIOException(message, e);
        }
    }
View Full Code Here

            handler.setResult(new StreamResult(this.output));
            this.setContentHandler(handler);
            this.setLexicalHandler(handler);
        } catch (Exception e) {
            final String message = "Cannot set HTMLSerializer outputstream";
            throw new CascadingIOException(message, e);
        }
    }
View Full Code Here

            oos.flush();
            oos.close();
        } catch (IOException io) {
            throw io;
        } catch (Exception ignore) {
            throw new CascadingIOException("Exception.", ignore);
        } finally {
            this.resolver.release( child );
        }
    }
View Full Code Here

                    child = adjustName((TraversableSource) child, blockName);
                children.put(blockName, child);
            }
            return children;
        } catch (ServiceException se) {
            throw new CascadingIOException("SourceResolver is not available.", se);
        } finally {
            this.manager.release(resolver);
        }
    }
View Full Code Here

        this.response = response;
        if (this.expires != 0) {
            try {
                this.cache.store(this.cacheKey, this.response);
            } catch (ProcessingException e) {
                throw new CascadingIOException("Failure storing response.", e);
            }
        }
    }
View Full Code Here

                if (e instanceof SAXException) {
                    throw (SAXException) e;
                } else if (e instanceof IOException) {
                    throw (IOException) e;
                }
                throw new CascadingIOException(e);
            }
        }

        return response.getXMLResponse();
    }
View Full Code Here

                }
            }

            return (byte[]) serializer.getSAXFragment();
        } catch (ServiceException e) {
            throw new CascadingIOException("Missing service dependency.", e);
        } finally {
            if (xmlizer != null) {
                manager.release(xmlizer);
            }
        }
View Full Code Here

        this.response = response;
        if (this.expires != 0) {
            try {
                this.cache.store(this.cacheKey, this.response);
            } catch (ProcessingException e) {
                throw new CascadingIOException("Failure storing response.", e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.CascadingIOException

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.