Package org.apache.cocoon

Examples of org.apache.cocoon.CascadingIOException


                }
            }

            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


            }
        }
        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

                    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

                    _cell.setCellValue(form.parse(content).doubleValue());
                } else {
                    _cell.setCellValue(Integer.parseInt(content));
                }
            } catch (NumberFormatException e) {
                throw new CascadingIOException("Invalid value for a numeric cell: " + content, e);
            } catch (ParseException e) {
                throw new CascadingIOException("Invalid value for a numberic cell: " + content, e);
            }
        } else if (_cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {
            _cell.setCellValue(content);
        } else if (_cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
            _cell.setCellFormula(content.toUpperCase().substring(1));
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

            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

            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) {
View Full Code Here

            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

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.