public class ObsFSBucket extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected ObsClient |
innerClient |
| 构造器 | 说明 |
|---|---|
ObsFSBucket(String bucketName,
String location) |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
protected void |
checkInternalClient() |
|
String |
getBucketName() |
Obtain the bucket name.
|
String |
getLocation() |
Obtain the bucket location.
|
ObsFSFile |
newFile(String fileName,
File file) |
Create a file.
|
ObsFSFile |
newFile(String fileName,
File file,
ObjectMetadata metadata) |
Create a file.
|
ObsFSFile |
newFile(String fileName,
InputStream input) |
Create a file.
|
ObsFSFile |
newFile(String fileName,
InputStream input,
ObjectMetadata metadata) |
Create a file.
|
ObsFSFolder |
newFolder(String folderName) |
Create a folder.
|
HeaderResponse |
setFSStatus(FSStatusEnum status) |
Set status of the file gateway feature for a bucket.
|
protected void |
setInnerClient(ObsClient innerClient) |
protected ObsClient innerClient
protected void setInnerClient(ObsClient innerClient)
public HeaderResponse setFSStatus(FSStatusEnum status) throws ObsException
status - Status of the file gateway featureObsException - OBS SDK self-defined exception, thrown when the interface
fails to be called or access to OBS failspublic ObsFSFolder newFolder(String folderName) throws ObsException
folderName - Folder nameObsException - OBS SDK self-defined exception, thrown when the interface
fails to be called or access to OBS failspublic ObsFSFile newFile(String fileName, InputStream input, ObjectMetadata metadata) throws ObsException
fileName - File nameinput - File input streammetadata - File propertiesObsException - OBS SDK self-defined exception, thrown when the interface
fails to be called or access to OBS failspublic ObsFSFile newFile(String fileName, InputStream input) throws ObsException
fileName - File nameinput - File input streamObsException - OBS SDK self-defined exception, thrown when the interface
fails to be called or access to OBS failspublic ObsFSFile newFile(String fileName, File file, ObjectMetadata metadata) throws ObsException
fileName - File namefile - Local path to the filemetadata - File propertiesObsException - OBS SDK self-defined exception, thrown when the interface
fails to be called or access to OBS failspublic ObsFSFile newFile(String fileName, File file) throws ObsException
fileName - File namefile - Local path to the fileObsException - OBS SDK self-defined exception, thrown when the interface
fails to be called or access to OBS failspublic String getBucketName()
public String getLocation()
protected void checkInternalClient()
Copyright © 2025. All rights reserved.