public final class BlobId implements SerializableGoogle 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.
Implements
SerializableStatic Methods
fromGsUtilUri(String gsUtilUri)
public static BlobId fromGsUtilUri(String gsUtilUri)Creates a BlobId object.
| Name | Description |
gsUtilUri |
Stringthe Storage url to create the blob from |
| Type | Description |
BlobId |
of(String bucket, String name)
public static BlobId of(String bucket, String name)Creates a blob identifier. Generation is set to null.
| Name | Description |
bucket |
Stringthe name of the bucket that contains the blob |
name |
Stringthe name of the blob |
| Type | Description |
BlobId |
of(String bucket, String name, Long generation)
public static BlobId of(String bucket, String name, Long generation)Creates a BlobId object.
| Name | Description |
bucket |
Stringname of the containing bucket |
name |
Stringblob's name |
generation |
Longblob's data generation, used for versioning. If |
| Type | Description |
BlobId |
Methods
equals(Object obj)
public boolean equals(Object obj)| Name | Description |
obj |
Object |
| Type | Description |
boolean |
getBucket()
public String getBucket()Returns the name of the bucket containing the blob.
| Type | Description |
String |
getGeneration()
public Long getGeneration()Returns blob's data generation. Used for versioning.
| Type | Description |
Long |
getName()
public String getName()Returns the name of the blob.
| Type | Description |
String |
hashCode()
public int hashCode()| Type | Description |
int |
toGsUtilUri()
public String toGsUtilUri()Returns this blob's Storage url which can be used with gsutil
| Type | Description |
String |
toString()
public String toString()| Type | Description |
String |