/** * Creates an instance of the <code>CloudBlockBlob</code> class using the specified absolute URI. * * @param blobAbsoluteUri * A <code>java.net.URI</code> object that represents the absolute URI to the blob. * * @throws StorageException * If a storage service error occurred. */ public CloudBlockBlob(final URI blobAbsoluteUri) throws StorageException { this(new StorageUri(blobAbsoluteUri)); }
/** * Creates an instance of the <code>CloudFileShare</code> class using the specified URI. * * @param uri * A <code>java.net.URI</code> object that represents the absolute URI of the share. * * @throws StorageException * If a storage service error occurred. */ public CloudFileShare(final URI uri) throws StorageException { this(new StorageUri(uri)); }
/** * Creates an instance of the <code>CloudBlockBlob</code> class using the specified absolute URI. * * @param blobAbsoluteUri * A <code>java.net.URI</code> object that represents the absolute URI to the blob. * * @throws StorageException * If a storage service error occurred. */ public CloudBlockBlob(final URI blobAbsoluteUri) throws StorageException { this(new StorageUri(blobAbsoluteUri)); }
/** * Creates an instance of the <code>CloudFileDirectory</code> class using an absolute URI to the directory. * * @param directoryAbsoluteUri * A {@link URI} that represents the file directory's address. * @throws StorageException * @throws URISyntaxException */ public CloudFileDirectory(final URI directoryAbsoluteUri) throws StorageException, URISyntaxException { this(new StorageUri(directoryAbsoluteUri)); }
/** * Creates an instance of the <code>CloudBlobClient</code> class using the specified Blob service endpoint and * anonymous credentials. * * @param baseUri * A <code>java.net.URI</code> object that represents the Blob service endpoint used to create the * client. */ public CloudBlobClient(final URI baseUri) { this(new StorageUri(baseUri), null /* credentials */); }
/** * Creates an instance of the <code>CloudBlobContainer</code> class using the specified URI. The blob URI should * include a SAS token unless anonymous access is to be used. * * @param uri * A <code>java.net.URI</code> object which represents the URI of the container. * * @throws StorageException * If a storage service error occurred. */ public CloudBlobContainer(final URI uri) throws StorageException { this(new StorageUri(uri)); }
/** * Creates an instance of the <code>CloudFileShare</code> class using the specified URI. * * @param uri * A <code>java.net.URI</code> object that represents the absolute URI of the share. * * @throws StorageException * If a storage service error occurred. */ public CloudFileShare(final URI uri) throws StorageException { this(new StorageUri(uri)); }
/** * Creates an instance of the <code>CloudBlobClient</code> class using the specified Blob service endpoint and * anonymous credentials. * * @param baseUri * A <code>java.net.URI</code> object that represents the Blob service endpoint used to create the * client. */ public CloudBlobClient(final URI baseUri) { this(new StorageUri(baseUri), null /* credentials */); }
/** * Creates an instance of the <code>CloudFileDirectory</code> class using an absolute URI to the directory. * * @param directoryAbsoluteUri * A {@link URI} that represents the file directory's address. * @throws StorageException * @throws URISyntaxException */ public CloudFileDirectory(final URI directoryAbsoluteUri) throws StorageException, URISyntaxException { this(new StorageUri(directoryAbsoluteUri)); }
/** * Creates an instance of the <code>CloudQueue</code> class using the specified queue URI. The queue * <code>URI</code> must include a SAS token. * * @param uri * A <code>java.net.URI</code> object that represents the absolute URI of the queue. * * @throws StorageException * If a storage service error occurred. */ public CloudQueue(final URI uri) throws StorageException { this(new StorageUri(uri, null)); }
/** * Creates an instance of the <code>CloudAppendBlob</code> class using the specified absolute URI and storage service * client. * * @param blobAbsoluteUri * A <code>java.net.URI</code> object which represents the absolute URI to the blob. * * @throws StorageException * If a storage service error occurred. */ public CloudAppendBlob(final URI blobAbsoluteUri) throws StorageException { this(new StorageUri(blobAbsoluteUri)); }
/** * Creates an instance of the <code>CloudQueue</code> class using the specified queue URI. The queue * <code>URI</code> must include a SAS token. * * @param uri * A <code>java.net.URI</code> object that represents the absolute URI of the queue. * * @throws StorageException * If a storage service error occurred. */ public CloudQueue(final URI uri) throws StorageException { this(new StorageUri(uri, null)); }
/** * Initializes an instance of the <code>CloudTableClient</code> class using a Table service endpoint and * storage account credentials. * * @param baseUri * A <code>java.net.URI</code> object that represents the Table service endpoint used to initialize the * client. * @param credentials * A {@link StorageCredentials} object that represents the storage account credentials for access. */ public CloudTableClient(final URI baseUri, StorageCredentials credentials) { this(new StorageUri(baseUri), credentials); }
/** * Creates an instance of the <code>CloudBlobContainer</code> class using the specified URI and credentials. * * @param uri * A <code>java.net.URI</code> object that represents the absolute URI of the container. * @param credentials * A {@link StorageCredentials} object used to authenticate access. * * @throws StorageException * If a storage service error occurred. */ public CloudBlobContainer(final URI uri, final StorageCredentials credentials) throws StorageException { this(new StorageUri(uri), credentials); }
/** * Creates an instance of the <code>CloudFileClient</code> class using the specified File service endpoint and * account credentials. * * @param baseUri * A <code>java.net.URI</code> object that represents the File service endpoint used to create the * client. * @param credentials * A {@link StorageCredentials} object that represents the account credentials. */ public CloudFileClient(final URI baseUri, StorageCredentials credentials) { this(new StorageUri(baseUri), credentials); }
public static CloudBlobDirectory cloudBlobDirectoryFrom(StorageCredentials credentials, String uri, String dir) throws URISyntaxException, StorageException { StorageUri storageUri = new StorageUri(new URI(uri)); CloudBlobContainer container = new CloudBlobContainer(storageUri, credentials); return container.getDirectoryReference(dir); }
public static CloudBlobDirectory cloudBlobDirectoryFrom(StorageCredentials credentials, String uri, String dir) throws URISyntaxException, StorageException { StorageUri storageUri = new StorageUri(new URI(uri)); CloudBlobContainer container = new CloudBlobContainer(storageUri, credentials); return container.getDirectoryReference(dir); }
/** * Strips the Query and Fragment from the uri. * * @param inUri * the uri to alter * @return the stripped uri. * @throws StorageException */ public static StorageUri stripURIQueryAndFragment(final StorageUri inUri) throws StorageException { return new StorageUri(stripSingleURIQueryAndFragment(inUri.getPrimaryUri()), stripSingleURIQueryAndFragment(inUri.getSecondaryUri())); }
/** * Strips the Query and Fragment from the uri. * * @param inUri * the uri to alter * @return the stripped uri. * @throws StorageException */ public static StorageUri stripURIQueryAndFragment(final StorageUri inUri) throws StorageException { return new StorageUri(stripSingleURIQueryAndFragment(inUri.getPrimaryUri()), stripSingleURIQueryAndFragment(inUri.getSecondaryUri())); }
@Test public void testCloudStorageAccountAnonymousRoundtrip() throws InvalidKeyException, URISyntaxException { String accountString = "BlobEndpoint=http://blobs/"; assertEquals(accountString, CloudStorageAccount.parse(accountString).toString(true)); CloudStorageAccount account = new CloudStorageAccount( null, new StorageUri(new URI("http://blobs/")), null, null, null); AccountsAreEqual(account, CloudStorageAccount.parse(account.toString(true))); }