Package com.google.cloud.storage
Class BlobId
java.lang.Object
com.google.cloud.storage.BlobId
- All Implemented Interfaces:
Serializable
Google Storage Object identifier. A
BlobId object includes the name of the containing
bucket, the blob's name and possibly the blob's generation. If getGeneration() is
null the identifier refers to the latest blob's generation.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic BlobIdfromGsUtilUri(String gsUtilUri) Creates aBlobIdobject.Returns the name of the bucket containing the blob.Returns blob's data generation.getName()Returns the name of the blob.inthashCode()static BlobIdCreates a blob identifier.static BlobIdCreates aBlobIdobject.Returns this blob's Storage url which can be used with gsutil.Returns this blob's Storage url which can be used with gsutil.toString()
-
Method Details
-
getBucket
Returns the name of the bucket containing the blob. -
getName
Returns the name of the blob. -
getGeneration
Returns blob's data generation. Used for versioning. -
toGsUtilUri
Returns this blob's Storage url which can be used with gsutil. Ifgenerationis non-null it will not be included in the uri. -
toGsUtilUriWithGeneration
Returns this blob's Storage url which can be used with gsutil. Ifgenerationis non-null it will be included in the uri- Since:
- 2.22.1
-
toString
-
hashCode
public int hashCode() -
equals
-
of
Creates a blob identifier. Generation is set tonull.- Parameters:
bucket- the name of the bucket that contains the blobname- the name of the blob
-
of
Creates aBlobIdobject.- Parameters:
bucket- name of the containing bucketname- blob's namegeneration- blob's data generation, used for versioning. Ifnullthe identifier refers to the latest blob's generation
-
fromGsUtilUri
Creates aBlobIdobject.- Parameters:
gsUtilUri- the Storage url to create the blob from
-