public class BosObject extends Object implements Closeable
| Constructor and Description |
|---|
BosObject() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getBucketName()
Gets the name of the bucket in which this object is contained.
|
String |
getKey()
Gets the key under which this object is stored.
|
BosObjectInputStream |
getObjectContent()
Gets an input stream containing the contents of this object.
|
ObjectMetadata |
getObjectMetadata()
Gets the metadata stored by Bos for this object.
|
void |
setBucketName(String bucketName)
Sets the name of the bucket in which this object is contained.
|
void |
setKey(String key)
Sets the key under which this object is stored.
|
void |
setObjectContent(BosObjectInputStream objectContent)
Sets the input stream containing this object's contents.
|
void |
setObjectMetadata(ObjectMetadata objectMetadata)
Sets the object metadata for this object.
|
String |
toString() |
public String getBucketName()
public void setBucketName(String bucketName)
bucketName - The name of the bucket containing this object.public String getKey()
public void setKey(String key)
key - The key under which this object is stored.public ObjectMetadata getObjectMetadata()
public void setObjectMetadata(ObjectMetadata objectMetadata)
objectMetadata - The new metadata to set for this object in memory.public BosObjectInputStream getObjectContent()
public void setObjectContent(BosObjectInputStream objectContent)
objectContent - The input stream containing this object's contents.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2022. All rights reserved.