Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceNotFoundException


    public InputStream getInputStream() throws IOException {
        ZipInputStream zipStream = new ZipInputStream(this.archive.getInputStream());
        try {
            ZipEntry entry = findEntry(zipStream);
            if (entry == null) {
                throw new SourceNotFoundException("File " + this.filePath + " is not found in the archive " +
                                                  this.archive.getURI());
            }

            // Now we will extract the document and write it into a byte array
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here


        {
            return part.getInputStream();
        }
        catch (Exception ex)
        {
            throw new SourceNotFoundException("The part source can not be found.");
        }
    }
View Full Code Here

            }

            return new ByteArrayInputStream(os.toByteArray());

        } catch (ResourceNotFoundException e) {
            throw new SourceNotFoundException("Exception during processing of " + this.systemId, e);
        } catch (Exception e) {
            throw new SourceException("Exception during processing of " + this.systemId, e);
        } finally {
            if (touchedOM) {
                //Because of complicated flow of this source it must maintain the cleaness of OM on its own
View Full Code Here

                }
            }
        } while (document != null && found == false);

        if (document == null) {
            throw new SourceNotFoundException(
                "The document "
                    + documentName
                    + " is not in the archive "
                    + this.archive.getURI());
        }
View Full Code Here

    public InputStream getInputStream()
        throws IOException, SourceException
    {
        if (!exists())
        {
            throw new SourceNotFoundException(getURI());
        }
       
        return m_location.openStream();
    }
View Full Code Here

        }
        catch ( IOException e )
        {
            if ( e instanceof FileNotFoundException )
            {
                throw new SourceNotFoundException( e.getMessage() );
            }
            else
            {
                final String message =
                    "Failure during delete";
View Full Code Here

        {
            return new FileInputStream(this.m_file);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new SourceNotFoundException(this.m_uri + " doesn't exist.", fnfe);
        }
    }
View Full Code Here

     */
    public void delete() throws SourceException
    {
        if (!this.m_file.exists())
        {
            throw new SourceNotFoundException("Cannot delete non-existing file " + this.m_file.toString());
        }

        if (!this.m_file.delete())
        {
            throw new SourceException("Could not delete " + this.m_file.toString() + " (unknown reason)");
View Full Code Here

            error.append( this.m_uri );
            error.append( " (" );
            error.append( response );
            error.append( ")" );

            throw new SourceNotFoundException( error.toString() );
        }

        return method.getResponseBodyAsStream();
    }
View Full Code Here

      if (!isSourceNotFoundException(e))
        throw e;
    }
   
    if (result == null)
      throw new SourceNotFoundException("Global profile does not exist.");
   
    // change references to objects where no delta has been applied
    result.adjustReferences(global);
   
        // FIXME
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.SourceNotFoundException

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.