Package org.akubraproject

Examples of org.akubraproject.MissingBlobException


    ensureOpen();

    if (!file.exists()) {
      System.out.println(file);
      throw new MissingBlobException(getId());
    }
    return manager.manageInputStream(getConnection(), new FileInputStream(
        file));
  }
View Full Code Here


          "WildcastFSBlob cannot be moved.");
    }
    ensureOpen();

    if (!file.exists())
      throw new MissingBlobException(getId());

    return file.length();
  }
View Full Code Here

    makeParentDirs(other);

    if (!file.renameTo(other)) {
      if (!file.exists())
        throw new MissingBlobException(getId());

      throw new IOException("Rename failed for an unknown reason.");
    }

    if (modified != null && modified.remove(file))
View Full Code Here

  @Override
  public InputStream openInputStream() throws IOException {
    ensureOpen();

    if (!file.exists())
      throw new MissingBlobException(getId());

    return manager.manageInputStream(getConnection(), new FileInputStream(file));
  }
View Full Code Here

  @Override
  public long getSize() throws IOException {
    ensureOpen();

    if (!file.exists())
      throw new MissingBlobException(getId());

    return file.length();
  }
View Full Code Here

    private void check(boolean mustExist, boolean mustNotExist)
        throws IllegalStateException, MissingBlobException, DuplicateBlobException {
      ensureOpen();
      if (mustExist && storeId == null)
        throw new MissingBlobException(getId());
      if (mustNotExist && storeId != null)
        throw new DuplicateBlobException(getId());
    }
View Full Code Here

    makeParentDirs(other);

    if (!file.renameTo(other)) {
      if (!file.exists())
        throw new MissingBlobException(getId());

      throw new IOException("Rename failed for an unknown reason.");
    }

    if (modified != null && modified.remove(file))
View Full Code Here

      if (dest.exists())
        throw new DuplicateBlobException(blobId, "Destination blob already exists");

      MemData data = blobs.remove(id);
      if (data == null)
        throw new MissingBlobException(getId());

      blobs.put(dest.getId(), data);
    }

    return dest;
View Full Code Here

  private MemData getData() throws MissingBlobException {
    synchronized (blobs) {
      MemData data = blobs.get(id);
      if (data == null)
        throw new MissingBlobException(getId());
      return data;
    }
  }
View Full Code Here

TOP

Related Classes of org.akubraproject.MissingBlobException

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.