Examples of SourceException


Examples of org.apache.excalibur.source.SourceException

        {
            final StringBuffer message = new StringBuffer();
            message.append( "Exception thrown while creating " );
            message.append( HTTPClientSource.class.getName() );

            throw new SourceException( message.toString(), e );
        }
    }
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

                {
                    fsos.cancel();
                }
                catch ( Exception e )
                {
                    throw new SourceException( "Exception during cancel.", e );
                }
                return;
            }
        }
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

            }
            else
            {
                final String message =
                    "Failure during delete";
                throw new SourceException( message, e );
            }
        }
        finally
        {
            if ( ftpClient != null )
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

        {
            SourceUtil.copy(this.getInputStream(), ((ModifiableSource) destination).getOutputStream());
        }
        catch (IOException ioe)
        {
            throw new SourceException("Couldn't copy " + getURI() + " to " + destination.getURI(), ioe);
        }
    }
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

                parent.mkdirs(); // ensure parent directories exist
            }

            if (!m_file.renameTo(dest))
            {
                throw new SourceException("Couldn't move " + getURI() + " to " + destination.getURI());
            }
        }
        else
        {
            SourceUtil.move(this, destination);
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

            uri = file.toURL().toExternalForm();
        }
        catch (MalformedURLException mue)
        {
            // Can this really happen ?
            throw new SourceException("Failed to get URL for file " + file, mue);
        }

        if (!uri.startsWith(scheme))
        {
            // Scheme is not "file:"
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

     */
    public Source getChild(String name) throws SourceException
    {
        if (!m_file.isDirectory())
        {
            throw new SourceException(getURI() + " is not a directory");
        }

        return new FileSource(this.getScheme(), new File(m_file, name));

    }
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

    public Collection getChildren() throws SourceException
    {

        if (!m_file.isDirectory())
        {
            throw new SourceException(getURI() + " is not a directory");
        }

        // Build a FileSource object for each of the children
        File[] files = m_file.listFiles();
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

                {
                    fsos.cancel();
                }
                catch (Exception e)
                {
                    throw new SourceException("Exception during cancel.", e);
                }
                return;
            }
        }
View Full Code Here

Examples of org.apache.excalibur.source.SourceException

            throw new SourceNotFoundException("Cannot delete non-existing file " + m_file.toString());
        }
       
        if (!m_file.delete())
        {
            throw new SourceException("Could not delete " + m_file.toString() + " (unknown reason)");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.