Package io.fathom.cloud.blobs

Examples of io.fathom.cloud.blobs.BlobData


            image = imageService.createImage(getProject().getId(), metadata);
        }

        {
            BlobData data = BlobData.build(file);
            image = imageService.uploadData(image, data);
        }

        WrappedImage result = new WrappedImage();
        result.image = toModel(image.getData());
View Full Code Here


        ResponseBuilder response;
        ImageLocation imageLocation = image.getLocation();
        if (imageLocation.hasStored()) {
            String cookie = imageLocation.getStored();

            BlobData blob = imageDataService.getImageFile(cookie);

            response = Response.ok().entity(blob.asEntity());

            ByteString md5 = blob.getHash();
            response.header("Content-MD5", Hex.toHex(md5.toByteArray()));
        } else {
            response = Response.status(Status.NO_CONTENT);
        }
View Full Code Here

        try (TempFile tempImage = imageClient.downloadImage(imageUri, imageMetadata)) {
            log.info("Creating image record");
            Image image = imageService.createImage(projectId, metadata);

            log.info("Uploading image data");
            BlobData blobData = BlobData.build(tempImage.getFile());
            image = imageService.uploadData(image, blobData);

            return image;
        }
    }
View Full Code Here

                }
            }
        }

        if (localCache.exists()) {
            BlobData is = new BlobData(localCache, key);
            return is;
        } else {
            return null;
        }
    }
View Full Code Here

        return sis;
        // }
    }

    BlobData getBlob(BlobStore blobStore, ByteString key) throws IOException {
        final BlobData is = blobStore.find(key);

        if (is == null) {
            throw new IOException("Unable to open storage for range: " + Hex.toHex(key.toByteArray()));
        }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.blobs.BlobData

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.