Package depskyDep

Examples of depskyDep.StorageCloudException


      swift.getApi().createContainer(bucketName);

    }catch(Exception e){
      System.out.println("Cannot connect with RackSpace.");
      //e.printStackTrace();
      throw new StorageCloudException(StorageCloudException.INVALID_SESSION);
    }
    session_key = "sid";
    return session_key;
  }
View Full Code Here


        conn.createBucket(bucketName, region);
      }
    } catch (IOException e) {
      System.out.println("Cannot connect with Amazon S3.");
      //e.printStackTrace();
      throw new StorageCloudException(StorageCloudException.INVALID_SESSION);
    }

    session_key = "sid";
    return "sid";
  }
View Full Code Here

      }
      in.close();
      return id;
    } catch (Exception ex) {
      //ex.printStackTrace();
      throw new StorageCloudException("AWSS3Exception::" + ex.getMessage());
    }
  }
View Full Code Here

      byte[] array = getBytesFromInputStream(object.getObjectContent());

      object.getObjectContent().close();
      return array;
    } catch (Exception ex) {
      throw new StorageCloudException("AWSS3Exception::" + ex.getMessage());
    }
  }
View Full Code Here

  public boolean deleteData(String sid, String cid, String id) throws StorageCloudException {
    try {
      conn.deleteObject(bucketName, id);
      return true;
    } catch (Exception ex) {
      throw new StorageCloudException("AWSS3Exception::" + ex.getMessage());
    }
  }
View Full Code Here

      for(String str : allNames){
        conn.deleteObject(bucketName, str);
      }
      return true;
    } catch (Exception ex) {
      throw new StorageCloudException("AWSS3Exception::" + ex.getMessage());
    }
  }
View Full Code Here

          }
        }
      }
      throw new Exception("could not get the file id");
    } catch (Exception ex) {
      throw new StorageCloudException("AWSS3Exception::" + ex.getMessage());
    }
  }
View Full Code Here

    //S3Object container = conn.getObject(new GetObjectRequest(cid.concat(awsBucketLocation.toString()), id));
    //container.getObjectContent().close();
    if(exists(bucketName, cid+"/"+id))
      return new String[]{cid, id};
    else
      throw new StorageCloudException("AWSS3Exception:: Key not exist");
  }
View Full Code Here

      FileOutputStream fos = new FileOutputStream(newf);
      fos.write(data);
      fos.close();
      return id;
    } catch (IOException iOException) {
      throw new StorageCloudException(iOException.getMessage());
    }
  }
View Full Code Here

        baos.write(b);
      }
      fis.close();
      return baos.toByteArray();
    } catch (Exception e) {
      throw new StorageCloudException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of depskyDep.StorageCloudException

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.