Package org.pentaho.reporting.libraries.resourceloader

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


  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

      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

        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

  {
    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

  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

  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

  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

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

      }
      return new SimpleResource (data.getKey(), properties, Properties.class, data.getVersion(manager));
    }
    catch (IOException e)
    {
      throw new ResourceLoadingException("Failed to load the properties file.",e);
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

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.