public final class BlobURLParts extends Object
URLParser
class. You may construct a URL from parts by calling toURL().
It is also possible to use the empty constructor to build a blobURL from scratch.
NOTE: Changing any SAS-related field requires computing a new SAS signature.Constructor and Description |
---|
BlobURLParts()
Initializes a BlobURLParts object with all fields set to null, except unparsedParameters, which is an empty map.
|
Modifier and Type | Method and Description |
---|---|
String |
blobName()
|
String |
containerName()
The container name or
null if a ServiceURL was parsed. |
String |
host()
The host.
|
SASQueryParameters |
sasQueryParameters()
A
SASQueryParameters representing the SAS query parameters or null if there were no such
parameters. |
String |
scheme()
The scheme.
|
String |
snapshot()
The snapshot time or
null if anything except a URL to a snapshot was parsed. |
URL |
toURL()
Converts the blob URL parts to a
URL . |
Map<String,String[]> |
unparsedParameters()
The query parameter key value pairs aside from SAS parameters and snapshot time or
null if there were
no such parameters. |
BlobURLParts |
withBlobName(String blobName)
|
BlobURLParts |
withContainerName(String containerName)
The container name or
null if a ServiceURL was parsed. |
BlobURLParts |
withHost(String host)
The host.
|
BlobURLParts |
withSasQueryParameters(SASQueryParameters sasQueryParameters)
A
SASQueryParameters representing the SAS query parameters or null if there were no such
parameters. |
BlobURLParts |
withScheme(String scheme)
The scheme.
|
BlobURLParts |
withSnapshot(String snapshot)
The snapshot time or
null if anything except a URL to a snapshot was parsed. |
BlobURLParts |
withUnparsedParameters(Map<String,String[]> unparsedParameters)
The query parameter key value pairs aside from SAS parameters and snapshot time or
null if there were
no such parameters. |
public BlobURLParts()
public String scheme()
public BlobURLParts withScheme(String scheme)
public String host()
public BlobURLParts withHost(String host)
public String containerName()
null
if a ServiceURL
was parsed.public BlobURLParts withContainerName(String containerName)
null
if a ServiceURL
was parsed.public String blobName()
public BlobURLParts withBlobName(String blobName)
public String snapshot()
null
if anything except a URL to a snapshot was parsed.public BlobURLParts withSnapshot(String snapshot)
null
if anything except a URL to a snapshot was parsed.public SASQueryParameters sasQueryParameters()
SASQueryParameters
representing the SAS query parameters or null
if there were no such
parameters.public BlobURLParts withSasQueryParameters(SASQueryParameters sasQueryParameters)
SASQueryParameters
representing the SAS query parameters or null
if there were no such
parameters.public Map<String,String[]> unparsedParameters()
null
if there were
no such parameters.public BlobURLParts withUnparsedParameters(Map<String,String[]> unparsedParameters)
null
if there were
no such parameters.public URL toURL() throws MalformedURLException
URL
.java.net.URL
to the blob resource composed of all the elements in the object.MalformedURLException
- The fields present on the BlobURLParts object were insufficient to construct a valid URL or were
ill-formatted.This documentation was released into the public domain.