Package org.pentaho.reporting.libraries.repository

Examples of org.pentaho.reporting.libraries.repository.ContentIOException


                          final String fileName) throws ContentIOException, IOException
  {
    final Object data = request.getSession().getAttribute("report:" + reportName);
    if (data instanceof byte[] == false)
    {
      throw new ContentIOException("No such repository");
    }
    final ZipInputStream zin = new ZipInputStream(new ByteArrayInputStream((byte[]) data));
    ZipEntry ze = zin.getNextEntry();
    while (ze != null)
    {
View Full Code Here


   * @return the content entity for this name, never null.
   * @throws ContentIOException if an repository error occured.
   */
  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    throw new ContentIOException();
  }
View Full Code Here

  public FileContentLocation(final ContentLocation parent, final File backend) throws ContentIOException
  {
    super(parent, backend);
    if (backend.exists() == false || backend.isDirectory() == false)
    {
      throw new ContentIOException("The given backend-file is not a directory.");
    }
  }
View Full Code Here

  public FileContentLocation(final Repository repository, final File backend) throws ContentIOException
  {
    super(repository, backend);
    if (backend.exists() == false || backend.isDirectory() == false)
    {
      throw new ContentIOException("The given backend-file is not a directory.");
    }
  }
View Full Code Here

    final File file = getBackend();
    final File child = new File(file, name);
    if (child.exists() == false)
    {
      throw new ContentIOException("Not found:" + child);
    }
    try
    {
      if (IOUtils.getInstance().isSubDirectory(file, child) == false)
      {
        throw new ContentIOException("The given entry does not point to a sub-directory of this content-location");
      }
    }
    catch (IOException e)
    {
      throw new ContentIOException("IO Error.", e);
    }

    if (child.isDirectory())
    {
      return new FileContentLocation(this, child);
    }
    else if (child.isFile())
    {
      return new FileContentItem(this, child);
    }
    else
    {
      throw new ContentIOException("Not File nor directory.");
    }
  }
View Full Code Here

      final File tempFile = File.createTempFile(nameHint, "." + suffix, targetDirectory);
      return tempFile.getName();
    }
    catch (IOException e)
    {
      throw new ContentIOException("Unable to generate a name for the data file", e);
    }
  }
View Full Code Here

  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    final ContentEntity contentEntity = (ContentEntity) entries.get(name);
    if (contentEntity == null)
    {
      throw new ContentIOException("Not found:" + name);
    }
    return contentEntity;
  }
View Full Code Here

  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    final ContentEntity contentEntity = (ContentEntity) entries.get(name);
    if (contentEntity == null)
    {
      throw new ContentIOException("Not found:" + name);
    }
    return contentEntity;
  }
View Full Code Here

  public OutputStream getOutputStream() throws ContentIOException, IOException
  {
    if (newItem == false)
    {
      throw new ContentIOException("This item is no longer writeable.");
    }
    newItem = false;
    return new ZipEntryOutputStream(this);
  }
View Full Code Here

    return new ZipEntryOutputStream(this);
  }

  public InputStream getInputStream() throws ContentIOException, IOException
  {
    throw new ContentIOException("This item is not readable.");
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.repository.ContentIOException

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.