Package com.oracle.cloud.spring.storage
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
public class OracleStorageResource
extends org.springframework.core.io.AbstractResource
Default OCI Storage resource implementation of Spring Resource.
-
Constructor Summary
ConstructorsConstructorDescriptionOracleStorageResource(StorageLocation location, com.oracle.bmc.objectstorage.ObjectStorageClient osClient) OracleStorageResource(String bucketName, String objectName, String version, 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.Methods 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString
-
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.- Returns:
- String
-
getInputStream
Get the Input Stream instance for the given Storage Resource.- Returns:
- InputStream
- Throws:
IOException
-