Package org.apache.cocoon

Examples of org.apache.cocoon.CascadingIOException


            } else {
                result = new NumericResult(exception);
            }
        } 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

  public void addDirectory(File repository) throws IOException {
      try {
          this.addURL(repository.getCanonicalFile().toURL());
      } catch (MalformedURLException mue) {
          log.error("The repository had a bad URL", mue);
          throw new CascadingIOException("Could not add repository", mue);
      }
  }
View Full Code Here

      try {
          File file = new File(repository);
          this.addURL(file.getCanonicalFile().toURL());
      } catch (MalformedURLException mue) {
          log.error("The repository had a bad URL", mue);
          throw new CascadingIOException("Could not add repository", mue);
      }
  }
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.getTransformer().setOutputProperties(this.format);
            handler.setResult(new StreamResult(this.output));
            this.setContentHandler(handler);
            this.setLexicalHandler(handler);
        } catch (Exception e) {
            throw new CascadingIOException(e.toString(), e);
        }
    }
View Full Code Here

                    cnx = null;
                    tmp.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);
                }
            }
        }
View Full Code Here

                ByteArrayOutputStream os = new ByteArrayOutputStream();
                serializer.setOutputStream(os);
                this.toSAX(serializer);
                return new ByteArrayInputStream(os.toByteArray());
            } catch (SAXException se) {
                throw new CascadingIOException("Unable to stream content.", se);
            } catch (ServiceException ce) {
                throw new CascadingIOException("Unable to get components for serializing.", ce);
            } finally {
                if ( serializer != null ) {
                    serializerSelector.release(serializer);
                }
                sitemapManager.release(serializerSelector);
            }
        } catch (ContextException ce) {
            throw new CascadingIOException("Unable to get service manager.", ce);
        }
  }
View Full Code Here

        final Environment currentEnv = CocoonComponentManager.getCurrentEnvironment();
        org.apache.cocoon.environment.Source source;
        try {
            source = this.sourceFactory.getSource(currentEnv, location);
        } catch (ProcessingException pe) {
            throw new CascadingIOException("ProcessingException: " + pe.getMessage(), pe);
        }
        return new CocoonToAvalonSource( location, source );
    }
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.