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

    Constructors
    Constructor
    Description
    OracleStorageResource(StorageLocation location, com.oracle.bmc.objectstorage.ObjectStorageClient osClient)
     
    OracleStorageResource(String bucketName, String objectName, com.oracle.bmc.objectstorage.ObjectStorageClient osClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String location, com.oracle.bmc.objectstorage.ObjectStorageClient osClient)
    Creates 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, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.core.io.Resource

    getContentAsByteArray, getContentAsString
  • Constructor Details

    • OracleStorageResource

      public OracleStorageResource(String bucketName, String objectName, com.oracle.bmc.objectstorage.ObjectStorageClient osClient)
    • 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 URI
      osClient - OCI Storage SDK Client instance
      Returns:
      OracleStorageResource
    • getDescription

      public String getDescription()
      Gets the description of the resource.
      Returns:
      String
    • getInputStream

      public InputStream getInputStream() throws IOException
      Get the Input Stream instance for the given Storage Resource.
      Returns:
      InputStream
      Throws:
      IOException