Examples of CloudObject


Examples of com.cloudvane.ossc.infrastructure.CloudObject

   
    c.getClient().createDirectory(ncd);
   
    listDirectories(c, "List directories");
   
    CloudObject obj = new CloudObject();
    obj.setFileName(UUID.randomUUID().toString() + ".txt");
    obj.setCloudObject(new FileInputStream("ossc.config"));
    obj.setDirectoryName(c.getClient().getFullPath(ncd));
   
    c.getClient().createObject(ncd, obj);
   
    listDirectories(c, "Now with a file");
   
View Full Code Here

Examples of com.cloudvane.ossc.infrastructure.CloudObject

  public List<CloudObject> listObjectsInDirectory(CloudDirectory directory) {
    List<CloudObject> retval = new LinkedList<CloudObject>();
    File maindirectory = new File(getDirectory() + File.separator + directory.getDirectoryName());
   
    for(File f : maindirectory.listFiles()) {
      CloudObject co = new CloudObject();
      co.setAccessControl(AccessControlEnum.Public);
      co.setFileName(f.getName());
      co.setDirectoryName(maindirectory.getAbsolutePath() + File.separator);
      retval.add(co);
    }
   
    return retval;
  }
View Full Code Here

Examples of io.fathom.cloud.storage.api.os.models.CloudObject

            md5.setState(file.getHashResume(), file.getLength());
            md5.update(blob.data);
        } else {
            BlobStore blobStore = getBlobStore(project);

            CloudObject cloudObject = new CloudObject(oldFileData);
            try (InputStream is = cloudObject.getInputStream(blobStore)) {
                md5.update(is);
            }
            md5.update(blob.data);
        }
View Full Code Here

Examples of io.fathom.cloud.storage.api.os.models.CloudObject

    @Override
    public StreamingOutput open(FsFile file, Long from, Long to) {
        // TODO: This can be made much more efficient

        CloudObject object = new CloudObject(file.getData());

        final InputStream is;
        try {
            BlobStore blobStore = getBlobStore(file.getProject());
            is = object.getInputStream(blobStore, from, to);
        } catch (IOException e) {
            throw new IllegalStateException("Error opening file", e);
        }

        StreamingOutput stream = new StreamingOutput() {
View Full Code Here

Examples of io.fathom.cloud.storage.api.os.models.CloudObject

        FsFile fsFile = findFileInfo(fsBucket, name);
        if (fsFile == null) {
            return null;
        }

        CloudObject object = new CloudObject(fsFile.getData());

        BlobStore blobStore = getBlobStore(project);
        return object.asByteSource(blobStore, from, to);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.