use of com.microsoft.azure.storage.blob.CloudBlockBlob in project tdi-studio-se by Talend.
the class AzureFileSystem method exists.
public boolean exists(String file) {
boolean doesExist = false;
try {
CloudBlockBlob blob = this.container.getBlockBlobReference(file);
doesExist = blob.exists();
} catch (Exception e) {
System.err.println(e.getMessage());
}
return doesExist;
}
use of com.microsoft.azure.storage.blob.CloudBlockBlob in project jackrabbit-oak by apache.
the class AzureBlobStoreBackend method addMetadataRecordImpl.
private void addMetadataRecordImpl(final InputStream input, String name, long recordLength) throws DataStoreException {
try {
CloudBlobDirectory metaDir = getAzureContainer().getDirectoryReference(META_DIR_NAME);
CloudBlockBlob blob = metaDir.getBlockBlobReference(name);
blob.upload(input, recordLength);
} catch (StorageException e) {
LOG.info("Error adding metadata record. metadataName={} length={}", name, recordLength, e);
throw new DataStoreException(e);
} catch (URISyntaxException | IOException e) {
throw new DataStoreException(e);
}
}
Aggregations