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,
Map<String,byte[]> metadata,
long contentGeneration,
long metaGeneration)
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.
|
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 which 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.
|
boolean |
isBucket()
Indicates whether this item is a bucket.
|
boolean |
isRoot()
Indicates whether this item refers to the GCS root (gs://).
|
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, 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 String getBucketName()
public String getObjectName()
public StorageResourceId getResourceId()
public long getCreationTime()
public long getSize()
public String getLocation()
public String getStorageClass()
public Map<String,byte[]> getMetadata()
public boolean isBucket()
public boolean isRoot()
public boolean exists()
public long getContentGeneration()
public long getMetaGeneration()
public String toString()
Copyright © 2015. All rights reserved.