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() |
protected void |
finalize() |
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 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 © 2019. All rights reserved.