Package org.pentaho.reporting.libraries.resourceloader

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


  public long getVersion(final ResourceManager caller)
          throws ResourceLoadingException
  {
    final ResourceKey parentKey = key.getParent();
    final ResourceData data = caller.load(parentKey);
    return data.getVersion(caller);
  }
View Full Code Here


    if (caller == null)
    {
      throw new NullPointerException();
    }

    final ResourceData cdata = CachingResourceData.createCached(data);
    dataCache.put(new Element(data.getKey(), new DefaultResourceDataCacheEntry(cdata, caller)));
    return cdata;
  }
View Full Code Here

    }
    final File ttfCache = new File(location, "afm-fontcache.ser");
    try
    {
      final ResourceKey resourceKey = resourceManager.createKey(ttfCache);
      final ResourceData data = resourceManager.load(resourceKey);
      final InputStream stream = data.getResourceAsStream(resourceManager);

      final HashMap cachedSeenFiles;
      final HashMap cachedFontFamilies;
      final HashMap cachedFullFontNames;
      final HashMap cachedAlternateNames;
View Full Code Here

    }
    final File ttfCache = new File(location, "afm-fontcache.ser");
    try
    {
      final ResourceKey resourceKey = resourceManager.createKey(ttfCache);
      final ResourceData data = resourceManager.load(resourceKey);
      final InputStream stream = data.getResourceAsStream(resourceManager);

      final HashMap cachedSeenFiles;
      final HashMap cachedFontFamilies;
      final HashMap cachedFullFontNames;
      final HashMap cachedAlternateNames;
View Full Code Here

    }
    final File ttfCache = new File(location, "ttf-fontcache.ser");
    try
    {
      final ResourceKey resourceKey = resourceManager.createKey(ttfCache);
      final ResourceData data = resourceManager.load(resourceKey);
      final InputStream stream = data.getResourceAsStream(resourceManager);

      final HashMap cachedSeenFiles;
      final HashMap cachedFontFamilies;
      final HashMap cachedFullFontNames;
      final HashMap cachedAlternateNames;
View Full Code Here

  private String writeRaw(final ResourceKey source) throws IOException
  {
    try
    {
      final ResourceData resourceData = resourceManager.load(source);
      final String mimeType = queryMimeType(resourceData);
      if (isValidImage(mimeType))
      {

        // lets do some voodo ..
        final ContentItem item = dataLocation.createItem
            (dataNameGenerator.generateName(extractFilename(resourceData), mimeType));
        if (item.isWriteable())
        {
          item.setAttribute(LibRepositoryBoot.REPOSITORY_DOMAIN,
              LibRepositoryBoot.CONTENT_TYPE, mimeType);

          // write it out ..
          final InputStream stream =
              resourceData.getResourceAsStream(resourceManager);
          final OutputStream outputStream = item.getOutputStream();
          IOUtils.getInstance().copyStreams
              (stream, outputStream);
          outputStream.close();
          stream.close();
View Full Code Here

TOP

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

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.