Package org.jfree.repository

Examples of org.jfree.repository.ContentIOException


  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

  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    if (contentItem == null)
    {
      throw new ContentIOException("No such item");
    }
    if (contentItem.getName().equals(name))
    {
      return contentItem;
    }
    throw new ContentIOException("No such item");
  }
View Full Code Here

    return EMPTY_CONTENT_ENTITY;
  }

  public ContentEntity getEntry(final String name) throws ContentIOException
  {
    throw new ContentIOException();
  }
View Full Code Here

  public ContentEntity getEntry(String name) throws ContentIOException
  {
    if (contentItem == null)
    {
      throw new ContentIOException("No such item");
    }
    if (contentItem.getName().equals(name))
    {
      return contentItem;
    }
    throw new ContentIOException("No such item");
  }
View Full Code Here

  {
    final File file = getBackend();
    final File child = new File (file, name);
    if (child.exists() == false)
    {
      throw new ContentIOException("Not found.");
    }
    try
    {
      if (IOUtils.getInstance().isSubDirectory(file, child))
      {
        throw new ContentIOException("Not sub-directory");
      }
    }
    catch (IOException e)
    {
      throw new ContentIOException("IO Error.");
    }

    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

  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

    return new ContentEntity[0];
  }

  public ContentEntity getEntry(String name) throws ContentIOException
  {
    throw new ContentIOException();
  }
View Full Code Here

  {
    final File file = getBackend();
    final File child = new File (file, name);
    if (child.exists() == false)
    {
      throw new ContentIOException("Not found.");
    }
    try
    {
      if (IOUtils.getInstance().isSubDirectory(file, child))
      {
        throw new ContentIOException("Not sub-directory");
      }
    }
    catch (IOException e)
    {
      throw new ContentIOException("IO Error.");
    }

    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

TOP

Related Classes of org.jfree.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.