public class ObsFSBucket extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ObsClient |
innerClient |
| Constructor and Description |
|---|
ObsFSBucket(String bucketName,
String location) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInternalClient() |
String |
getBucketName()
获取桶名
|
String |
getLocation()
获取桶的区域位置
|
ObsFSFile |
newFile(String fileName,
File file)
创建文件
|
ObsFSFile |
newFile(String fileName,
File file,
ObjectMetadata metadata)
创建文件
|
ObsFSFile |
newFile(String fileName,
InputStream input)
创建文件
|
ObsFSFile |
newFile(String fileName,
InputStream input,
ObjectMetadata metadata)
创建文件
|
ObsFSFolder |
newFolder(String folderName)
创建文件夹
|
HeaderResponse |
setFSStatus(FSStatusEnum status)
设置桶的文件网关特性状态
|
protected void |
setInnerClient(ObsClient innerClient) |
protected ObsClient innerClient
protected void setInnerClient(ObsClient innerClient)
public HeaderResponse setFSStatus(FSStatusEnum status) throws ObsException
status - 桶的文件网关特性状态ObsException - OBS SDK自定义异常,当调用接口失败、访问OBS失败时抛出该异常public ObsFSFolder newFolder(String folderName) throws ObsException
folderName - 文件夹名ObsException - OBS SDK自定义异常,当调用接口失败、访问OBS失败时抛出该异常public ObsFSFile newFile(String fileName, InputStream input, ObjectMetadata metadata) throws ObsException
fileName - 文件名input - 文件输入流metadata - 文件的属性ObsException - OBS SDK自定义异常,当调用接口失败、访问OBS失败时抛出该异常public ObsFSFile newFile(String fileName, InputStream input) throws ObsException
fileName - 文件名input - 文件输入流ObsException - OBS SDK自定义异常,当调用接口失败、访问OBS失败时抛出该异常public ObsFSFile newFile(String fileName, File file, ObjectMetadata metadata) throws ObsException
fileName - 文件名file - 本地文件路径metadata - 文件的属性ObsException - OBS SDK自定义异常,当调用接口失败、访问OBS失败时抛出该异常public ObsFSFile newFile(String fileName, File file) throws ObsException
fileName - 文件名file - 本地文件路径ObsException - OBS SDK自定义异常,当调用接口失败、访问OBS失败时抛出该异常public String getBucketName()
public String getLocation()
protected void checkInternalClient()
Copyright © 2021. All rights reserved.