Package org.apache.cocoon

Examples of org.apache.cocoon.CascadingIOException


            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


            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

        try {
            _sheet = new Sheet(getWorkbook());
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
            throw new CascadingIOException(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 numeric 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 initialize(final Attribute [] attributes,
                           final ElementProcessor parent) throws IOException {
        try {
            _parent = ( BaseElementProcessor ) parent;
        } catch (ClassCastException ignored) {
            throw new CascadingIOException(
                "parent is not compatible with this serializer", ignored);
        }

        // can't trust the guarantee -- an overriding implementation
        // may have screwed this up
View Full Code Here

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

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

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

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

            } else {
                result = new NumericResult(exception);
            }
        } catch (NumberFormatException ignored) {
            result = new NumericResult(
                new CascadingIOException(
                    "\"" + input + "\" does not represent a double value", ignored));
        }
        return result;
    }
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.