Examples of ResourceLoadingException


Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

    {
      return inputRepository.createInputStream(resourceIdentifer);
    }
    catch (IOException e)
    {
      throw new ResourceLoadingException
              ("Failed to create input stream for " + resourceIdentifer, e);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

    public ResourceData load(final ResourceKey key)
            throws ResourceLoadingException
    {
        if (!isSupportedKey(key))
        {
            throw new ResourceLoadingException("None of my keys.");
        }

        return new InputRepositoryResourceData(key, inputRepository);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

      throw new NullPointerException();
    }
    final File file = (File) key.getIdentifier();
    if (file.exists() == false)
    {
      throw new ResourceLoadingException
              ("File-handle given does not point to an existing file.");
    }
    if (file.isFile() == false)
    {
      throw new ResourceLoadingException
              ("File-handle given does not point to a regular file.");
    }
    if (file.canRead() == false)
    {
      throw new ResourceLoadingException
              ("File '" + file + "' is not readable.");
    }
    this.key = key;
    this.file = file;
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

  public ResourceData load(final ResourceKey key) throws ResourceLoadingException
  {
    if (isSupportedKey(key) == false)
    {
      throw new ResourceLoadingException("Key format is not recognized.");
    }
    return new ZipResourceData(key);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

      final int buffer = (int) Math.max(4096, Math.min(file.length(), 128 * 1024));
      return new BufferedInputStream(new FileInputStream(file), buffer);
    }
    catch (FileNotFoundException e)
    {
      throw new ResourceLoadingException("Unable to open Stream: ", e);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

        zin.close();
      }
    }
    catch (IOException e)
    {
      throw new ResourceLoadingException
              ("Reading the zip-file failed.", e);
    }
    throw new ResourceLoadingException
            ("The zip-file did not contain the specified entry");
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

  {
    final InputStream stream = ObjectUtilities.getResourceAsStream
        (resourcePath, ClassloaderResourceData.class);
    if (stream == null)
    {
      throw new ResourceLoadingException("Resource is not available: " + resourcePath);
    }
    return stream;
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

  public ResourceData load(final ResourceKey key) throws ResourceLoadingException
  {
    if (isSupportedKey(key) == false)
    {
      throw new ResourceLoadingException("Key format is not recognized.");
    }
    return new FileResourceData(key);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

  public ResourceData load(final ResourceKey key) throws ResourceLoadingException
  {
    if (isSupportedKey(key) == false)
    {
      throw new ResourceLoadingException("The key type is not supported.");
    }
    return new RawResourceData(key);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

  public ResourceData load(final ResourceKey key) throws ResourceLoadingException
  {
    if (isSupportedKey(key) == false)
    {
      throw new ResourceLoadingException("Key format is not recognized.");
    }
    return new ClassloaderResourceData(key);
  }
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.