Package org.apache.cocoon

Examples of org.apache.cocoon.CascadingIOException


                try {
                    cnx.close();
                } catch (Exception e) {
                    String msg = "Error closing the connection for " + BlobSource.this.getURI();
                    BlobSource.this.getLogger().warn(msg, e);
                    throw new CascadingIOException(msg + " : " + e.getMessage(), e);
                } finally {
                    cnx = null;
                }
            }
        }
View Full Code Here


        {
            throw e;
        }
        catch (Exception e)
        {
            throw new CascadingIOException(e.getMessage(), e);
        }
    }
View Full Code Here

                lines.add(line);
            }
            String[] asciiArt = (String[]) lines.toArray(new String[0]);
            return asciiArt;
        } catch (SourceException se) {
            throw new CascadingIOException("Cannot get input stream", se);
        } finally {
            if (is != null) {
                is.close();
            }
            if (br != null) {
View Full Code Here

                    cnx = null;
                    tmp.close();
                } catch(Exception e) {
                    String msg = "Error closing the connection for " + BlobSource.this.systemId;
                    BlobSource.this.getLogger().warn(msg, e);
                    throw new CascadingIOException(msg + " : " + e.getMessage(), e);
                }
            }
        }
View Full Code Here

            this.toSAX(serializer);

            return new ByteArrayInputStream(os.toByteArray());
        } catch (ComponentException cme) {
            throw new CascadingIOException("could not lookup pipeline components", cme);
        } catch (Exception e) {
            throw new CascadingIOException("Exception during processing of " + this.getURI(), e);
        } finally {
            if (serializer != null) serializerSelector.release(serializer);
            if (serializerSelector != null) this.manager.release(serializerSelector);
        }
    }
View Full Code Here

            }
        }
        catch (NumberFormatException ignored)
        {
            result = new NumericResult(
                new CascadingIOException(
                    "\"" + input + "\" does not represent a double value", ignored));
        }
        return result;
    }
View Full Code Here

            }
        }
        catch (NumberFormatException ignored)
        {
            result = new NumericResult(
                new CascadingIOException(
                    "\"" + input + "\" does not represent an integer value", ignored));
        }
        return result;
    }
View Full Code Here

            throws IOException {

            try {
                return source.getInputStream();
            } catch(Exception e) {
                throw new CascadingIOException("Cannot open URL " + this.url, e);
            } finally {
                this.resolver.release(this.source);
            }
        }
View Full Code Here

            Source redirectSource = null;
            try {
                redirectSource = this.resolveURI(newURL);
                this.toSAX(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

     */
    public final void addDirectory(File file) throws IOException {
        try {
            this.addURL(file.getCanonicalFile().toURL());
        } catch (MalformedURLException mue) {
            throw new CascadingIOException("Could not add repository", mue);
        }
    }
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.