blob.download(os, null, null, operationContext); } catch (StorageException e) { storedException.set(e);
blob.download(new ByteArrayOutputStream(), null, null, sendingRequestEventContext); assertEquals(2, callList.size());
OutputStream os = ...; // get the OutputStream from the HTTP Response CloudBlobContainer container = blobClient.getContainerReference("<container-name>"); CloudBlob blob = getBlockBlobReference("<blob-name>"); blob.download(os)
/** * Downloads the contents of a blob to a stream. * * @param outStream * An <code>{@link OutputStream}</code> object that represents the target stream. * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public final void download(final OutputStream outStream) throws StorageException { this.download(outStream, null /* accessCondition */, null /* options */, null /* opContext */); }
/** * Downloads the contents of a blob to a stream. * * @param outStream * An <code>{@link OutputStream}</code> object that represents the target stream. * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public final void download(final OutputStream outStream) throws StorageException { this.download(outStream, null /* accessCondition */, null /* options */, null /* opContext */); }
public void download(final CloudBlob blob, final OutputStream outStream) throws StorageException { blob.download(outStream, null, null, AzureStorageUtils.getTalendOperationContext()); }
public void download(final CloudBlob blob, final OutputStream outStream) throws StorageException { blob.download(outStream, null, null, AzureStorageUtils.getTalendOperationContext()); }
public static void readBufferFully(CloudBlob blob, Buffer buffer) throws IOException { try { blob.download(new ByteBufferOutputStream(buffer)); buffer.flip(); } catch (StorageException e) { throw new IOException(e); } }
public static void readBufferFully(CloudBlob blob, Buffer buffer) throws IOException { try { blob.download(new ByteBufferOutputStream(buffer)); buffer.flip(); } catch (StorageException e) { throw new IOException(e); } }
OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(path)); try { this.download(outputStream, accessCondition, options, opContext); outputStream.close();
OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(path)); try { this.download(outputStream, accessCondition, options, opContext); outputStream.close();
blob.download(new FileOutputStream("your storage location" + blob.getName() + ".jpeg")); Log.d(" blob.getName()=", " " + blob.getName()); break;
@Override protected void readAll(final List<Address> members, final String clustername, final Responses responses) { if (clustername == null) { return; } String prefix = sanitize(clustername); Iterable<ListBlobItem> listBlobItems = containerReference.listBlobs(prefix); for (ListBlobItem blobItem : listBlobItems) { try { // If the item is a blob and not a virtual directory. // n.b. what an ugly API this is if (blobItem instanceof CloudBlob) { CloudBlob blob = (CloudBlob) blobItem; ByteArrayOutputStream os = new ByteArrayOutputStream(STREAM_BUFFER_SIZE); blob.download(os); byte[] pingBytes = os.toByteArray(); parsePingData(pingBytes, members, responses); } } catch (Exception t) { log.error("Error fetching ping data."); } } }
@Override protected void readAll(final List<Address> members, final String clustername, final Responses responses) { if (clustername == null) { return; } String prefix = sanitize(clustername); Iterable<ListBlobItem> listBlobItems = containerReference.listBlobs(prefix); for (ListBlobItem blobItem : listBlobItems) { try { // If the item is a blob and not a virtual directory. // n.b. what an ugly API this is if (blobItem instanceof CloudBlob) { CloudBlob blob = (CloudBlob) blobItem; ByteArrayOutputStream os = new ByteArrayOutputStream(STREAM_BUFFER_SIZE); blob.download(os); byte[] pingBytes = os.toByteArray(); parsePingData(pingBytes, members, responses); } } catch (Exception t) { log.error("Error fetching ping data."); } } }
blob.download(new FileOutputStream(SampleUtils.exportFileLocation + blob.getName()));
public void downloadBlobFileContent(@NotNull String connectionString, @NotNull BlobFile blobFile, @NotNull OutputStream content) throws AzureCmdException { try { CloudBlobClient client = getCloudBlobClient(connectionString); String containerName = blobFile.getContainerName(); CloudBlobContainer container = client.getContainerReference(containerName); CloudBlob blob = getCloudBlob(container, blobFile); blob.download(content); } catch (Throwable t) { throw new AzureCmdException("Error downloading the Blob File content", t); } }