Class S3ClientResource

java.lang.Object
org.springframework.core.io.AbstractResource
net.solarnetwork.common.s3.S3ClientResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class S3ClientResource extends org.springframework.core.io.AbstractResource implements org.springframework.core.io.Resource
Resource implementation for a remote S3 object using the S3Client API.
Version:
1.0
Author:
matt
  • Constructor Details

  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface org.springframework.core.io.InputStreamSource
      Throws:
      IOException
    • getObjectReference

      public S3ObjectReference getObjectReference()
      Get the object reference.
      Returns:
      the reference, never null
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.springframework.core.io.Resource
    • getURL

      public URL getURL() throws IOException
      Specified by:
      getURL in interface org.springframework.core.io.Resource
      Overrides:
      getURL in class org.springframework.core.io.AbstractResource
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Compute a hash code.

      This implementation returns a hash built from SettingSpecifierProvider.getSettingUid() and S3ObjectRef.

      Overrides:
      hashCode in class org.springframework.core.io.AbstractResource
    • equals

      public boolean equals(Object obj)
      Compare for equality.

      This implementation compares the SettingSpecifierProvider.getSettingUid() and S3ObjectRef values.

      Overrides:
      equals in class org.springframework.core.io.AbstractResource