public class GoogleCloudStorageItemInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
static GoogleCloudStorageItemInfo |
ROOT_INFO |
| Constructor and Description |
|---|
GoogleCloudStorageItemInfo(StorageResourceId resourceId,
long creationTime,
long size,
String location,
String storageClass)
Constructs an instance of GoogleCloudStorageItemInfo.
|
GoogleCloudStorageItemInfo(StorageResourceId resourceId,
long creationTime,
long size,
String location,
String storageClass,
String contentType,
Map<String,byte[]> metadata,
long contentGeneration,
long metaGeneration)
Constructs an instance of GoogleCloudStorageItemInfo.
|
GoogleCloudStorageItemInfo(StorageResourceId resourceId,
long creationTime,
long size,
String location,
String storageClass,
String contentType,
Map<String,byte[]> metadata,
long contentGeneration,
long metaGeneration,
VerificationAttributes verificationAttributes)
Constructs an instance of GoogleCloudStorageItemInfo.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
exists()
Indicates whether this item exists.
|
String |
getBucketName()
Gets bucket name of this item.
|
long |
getContentGeneration()
Get the content generation of the object.
|
String |
getContentType()
Gets the content-type of this item, or null if unknown or inapplicable.
|
long |
getCreationTime()
Gets creation time of this item.
|
String |
getLocation()
Gets location of this item.
|
Map<String,byte[]> |
getMetadata()
Gets user-supplied metadata for this item.
|
long |
getMetaGeneration()
Get the meta generation of the object.
|
String |
getObjectName()
Gets object name of this item.
|
StorageResourceId |
getResourceId()
Gets the resourceId that holds the (possibly null) bucketName and objectName of this object.
|
long |
getSize()
Gets size of this item (number of bytes).
|
String |
getStorageClass()
Gets storage class of this item.
|
VerificationAttributes |
getVerificationAttributes()
Get object validation attributes.
|
boolean |
isBucket()
Indicates whether this item is a bucket.
|
boolean |
isRoot()
Indicates whether this item refers to the GCS root (gs://).
|
boolean |
metadataEquals(Map<String,byte[]> otherMetadata)
Helper for checking logical equality of metadata maps, checking equality of keySet() between
this.metadata and otherMetadata, and then using Arrays.equals to compare contents of
corresponding byte arrays.
|
String |
toString()
Gets string representation of this instance.
|
public static final GoogleCloudStorageItemInfo ROOT_INFO
public GoogleCloudStorageItemInfo(StorageResourceId resourceId, long creationTime, long size, String location, String storageClass)
resourceId - identifies either root, a Bucket, or a StorageObjectcreationTime - Time when object was created (milliseconds since January 1, 1970 UTC).size - Size of the given object (number of bytes) or -1 if the object does not exist.public GoogleCloudStorageItemInfo(StorageResourceId resourceId, long creationTime, long size, String location, String storageClass, String contentType, Map<String,byte[]> metadata, long contentGeneration, long metaGeneration)
resourceId - identifies either root, a Bucket, or a StorageObjectcreationTime - Time when object was created (milliseconds since January 1, 1970 UTC).size - Size of the given object (number of bytes) or -1 if the object does not exist.metadata - User-supplied object metadata for this object.public GoogleCloudStorageItemInfo(StorageResourceId resourceId, long creationTime, long size, String location, String storageClass, String contentType, Map<String,byte[]> metadata, long contentGeneration, long metaGeneration, VerificationAttributes verificationAttributes)
resourceId - identifies either root, a Bucket, or a StorageObjectcreationTime - Time when object was created (milliseconds since January 1, 1970 UTC).size - Size of the given object (number of bytes) or -1 if the object does not exist.metadata - User-supplied object metadata for this object.public String getBucketName()
public String getObjectName()
public StorageResourceId getResourceId()
public long getCreationTime()
public long getSize()
public String getLocation()
public String getStorageClass()
public String getContentType()
public Map<String,byte[]> getMetadata()
public boolean isBucket()
public boolean isRoot()
public boolean exists()
public long getContentGeneration()
public long getMetaGeneration()
public VerificationAttributes getVerificationAttributes()
public boolean metadataEquals(Map<String,byte[]> otherMetadata)
public String toString()
Copyright © 2016. All rights reserved.