@Test public void testReceiveAndSaveToFile() throws IOException { String containerName = TEST_CONATINER_PREFIX + UUID.randomUUID().toString(); template.createContainer(containerName); String objectName = "string-1"; template.send(containerName, objectName, TEST_FILE); File f = File.createTempFile(getClass().getSimpleName(), ".txt"); FileUtils.forceDeleteOnExit(f); template.receiveAndSaveToFile(containerName, objectName, f); String receivedFileContent = FileUtils.readFileToString(f); System.out.println("Received file content: " + receivedFileContent); String orgFileContent = FileUtils.readFileToString(TEST_FILE); assertEquals("File conetent does not match", orgFileContent, receivedFileContent); }
public String receiveAndSaveToFile(String objectName, File toFile) { return receiveAndSaveToFile(defaultContainerName, objectName, toFile); }
AzureTemplate implements StorageOperations { public String receiveAndSaveToFile(String objectName, File toFile) { return receiveAndSaveToFile(defaultContainerName, objectName, toFile); } }
AzureTemplate implements StorageOperations { public String receiveAndSaveToFile(String objectName, File toFile) { return receiveAndSaveToFile(defaultContainerName, objectName, toFile); } AzureTemplate(final AzureCredentials credentials);  AzureTemplate(final AzureCredentials credentials, String defaultContainerName); }
AzureTemplate implements StorageOperations { public String receiveAndSaveToFile(String objectName, File toFile) { return receiveAndSaveToFile(defaultContainerName, objectName, toFile); } AzureTemplate(final AzureCredentials credentials);  AzureTemplate(final AzureCredentials credentials, String defaultContainerName); ContainerStatus checkContainerStatus(String containerName); void deleteObject(String objectName); void deleteObject(String containerName, String objectName); String createdSignedUrl(String containerName, String objectName, Date expiryDate); List<BlobDetails> listContainerObjectDetails(); List<BlobDetails> listContainerObjectDetails(String containerName); List<String> listContainerNames(); boolean createContainer(String containerName); void deleteContainer(String containerName); String receiveAndSaveToFile(String objectName, File toFile); String receiveAndSaveToFile(String containerName, String objectName, File toFile); InputStream receiveAsInputStream(String objectName); InputStream receiveAsInputStream(String containerName, String objectName); String receiveAsString(String objectName); String receiveAsString(String containerName, String objectName); String send(String objectName, String stringToSend); String send(String containerName, String objectName, String stringToSend); String send(File fileToSend); String send(String containerName, File fileToSend); String send(String containerName, String objectName, File fileToSend); String send(String objectName, InputStream is); String send(String containerName, String objectName, InputStream is); String getDefaultContainerName(); }
AzureTemplate implements StorageOperations { public String receiveAndSaveToFile(String objectName, File toFile) { return receiveAndSaveToFile(defaultContainerName, objectName, toFile); } AzureTemplate(final AzureCredentials credentials);  AzureTemplate(final AzureCredentials credentials, String defaultContainerName); ContainerStatus checkContainerStatus(String containerName); void deleteObject(String objectName); void deleteObject(String containerName, String objectName); String createdSignedUrl(String containerName, String objectName, Date expiryDate); List<BlobDetails> listContainerObjectDetails(); List<BlobDetails> listContainerObjectDetails(String containerName); List<String> listContainerNames(); boolean createContainer(String containerName); void deleteContainer(String containerName); String receiveAndSaveToFile(String objectName, File toFile); String receiveAndSaveToFile(String containerName, String objectName, File toFile); InputStream receiveAsInputStream(String objectName); InputStream receiveAsInputStream(String containerName, String objectName); String receiveAsString(String objectName); String receiveAsString(String containerName, String objectName); String send(String objectName, String stringToSend); String send(String containerName, String objectName, String stringToSend); String send(File fileToSend); String send(String containerName, File fileToSend); String send(String containerName, String objectName, File fileToSend); String send(String objectName, InputStream is); String send(String containerName, String objectName, InputStream is); String getDefaultContainerName(); static final String DEFAULT_CONTAINER_NAME; }