Class OracleStorageResource
java.lang.Object
org.springframework.core.io.AbstractResource
com.oracle.cloud.spring.storage.OracleStorageResource
- All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource, org.springframework.core.io.WritableResource
public class OracleStorageResource
extends org.springframework.core.io.AbstractResource
implements org.springframework.core.io.WritableResource
Default OCI Storage resource implementation of Spring Resource.
-
Constructor Summary
ConstructorsConstructorDescriptionOracleStorageResource(StorageLocation location, com.oracle.bmc.objectstorage.ObjectStorageClient osClient) OracleStorageResource(String bucketName, String objectName, com.oracle.bmc.objectstorage.ObjectStorageClient osClient) -
Method Summary
Modifier and TypeMethodDescriptionstatic OracleStorageResourceCreates new OracleStorageResource identified by location URI and other information.Gets the description of the resource.Get the Input Stream instance for the given Storage Resource.booleanMethods inherited from class org.springframework.core.io.AbstractResource
contentLength, createRelative, equals, exists, getFile, getFileForLastModifiedCheck, getFilename, getURI, getURL, hashCode, isFile, isOpen, isReadable, lastModified, readableChannel, toStringMethods inherited from interface org.springframework.core.io.Resource
contentLength, createRelative, exists, getContentAsByteArray, getContentAsString, getFile, getFilename, getFilePath, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannelMethods inherited from interface org.springframework.core.io.WritableResource
writableChannel
-
Constructor Details
-
OracleStorageResource
-
OracleStorageResource
public OracleStorageResource(StorageLocation location, com.oracle.bmc.objectstorage.ObjectStorageClient osClient)
-
-
Method Details
-
create
@Nullable public static OracleStorageResource create(String location, com.oracle.bmc.objectstorage.ObjectStorageClient osClient) Creates new OracleStorageResource identified by location URI and other information.- Parameters:
location- Object URIosClient- OCI Storage SDK Client instance- Returns:
- OracleStorageResource
-
getDescription
Gets the description of the resource.- Specified by:
getDescriptionin interfaceorg.springframework.core.io.Resource- Returns:
- String
-
getInputStream
Get the Input Stream instance for the given Storage Resource.- Specified by:
getInputStreamin interfaceorg.springframework.core.io.InputStreamSource- Returns:
- InputStream
- Throws:
IOException
-
isWritable
public boolean isWritable()- Specified by:
isWritablein interfaceorg.springframework.core.io.WritableResource
-
getOutputStream
- Specified by:
getOutputStreamin interfaceorg.springframework.core.io.WritableResource
-