Class S3Resource

java.lang.Object
net.microfalx.resource.AbstractResource
net.microfalx.resource.AbstractStatefulResource<com.amazonaws.services.s3.AmazonS3Client,com.amazonaws.services.s3.AmazonS3Client>
net.microfalx.resource.s3.S3Resource
All Implemented Interfaces:
Serializable, AutoCloseable, Cloneable, net.microfalx.resource.Resource, net.microfalx.resource.StatefulResource

public class S3Resource extends net.microfalx.resource.AbstractStatefulResource<com.amazonaws.services.s3.AmazonS3Client,com.amazonaws.services.s3.AmazonS3Client>
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface net.microfalx.resource.Resource

    net.microfalx.resource.Resource.Type
  • Field Summary

    Fields inherited from interface net.microfalx.resource.Resource

    FILE_NAME_ATTR, HASH_ATTR, NULL, PATH_ATTR
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.microfalx.resource.StatefulResource
    create(URI uri, net.microfalx.resource.Credential credential)
    Creates a resource and auto-detects the type.
    static net.microfalx.resource.StatefulResource
    create(net.microfalx.resource.Resource.Type type, URI uri, net.microfalx.resource.Credential credential)
    Creates a resource and auto-detects the type.
    static net.microfalx.resource.StatefulResource
    directory(URI uri, net.microfalx.resource.Credential credential)
    Creates a resource with a directory type.
    boolean
     
    static net.microfalx.resource.StatefulResource
    file(URI uri, net.microfalx.resource.Credential credential)
    Creates a resource with a file type.
    net.microfalx.resource.Resource
    get(String path, net.microfalx.resource.Resource.Type type)
     
     
    net.microfalx.resource.Resource
     
    net.microfalx.resource.Resource
    resolve(String path, net.microfalx.resource.Resource.Type type)
     
     

    Methods inherited from class net.microfalx.resource.AbstractStatefulResource

    close

    Methods inherited from class net.microfalx.resource.AbstractResource

    copyFrom, copyFrom, copyPropertiesFrom, create, createParents, delete, detectMimeType, empty, equals, exists, get, getAttribute, getAttributeNames, getAttributes, getCredential, getDescription, getFileExtension, getFragment, getId, getInputStream, getInputStream, getMimeType, getName, getOutputStream, getParent, getPath, getPath, getPath, getReader, getRoot, getType, getWriter, hasAttribute, hashCode, isAbsolutePath, isLocal, lastModified, length, list, loadAsBytes, loadAsBytes, loadAsString, loadAsString, toFile, toHash, toString, toURL, walk, walk, withAbsolutePath, withAttribute, withAttributes, withCredential, withDescription, withFragment, withMimeType, withMimeType, withName

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.microfalx.resource.Resource

    copyFrom, copyFrom, copyPropertiesFrom, create, createParents, delete, detectMimeType, empty, exists, get, getAttribute, getAttributeNames, getAttributes, getCredential, getDescription, getFileExtension, getFragment, getId, getInputStream, getInputStream, getMimeType, getName, getOutputStream, getParent, getPath, getPath, getPath, getReader, getRoot, getType, getWriter, hasAttribute, isAbsolutePath, isDirectory, isFile, isLocal, isReadable, isWritable, lastModified, length, list, loadAsBytes, loadAsBytes, loadAsString, loadAsString, toFile, toHash, toURL, walk, walk, withAbsolutePath, withAttribute, withAttributes, withCredential, withDescription, withFragment, withMimeType, withMimeType, withName
  • Method Details

    • file

      public static net.microfalx.resource.StatefulResource file(URI uri, net.microfalx.resource.Credential credential)
      Creates a resource with a file type.
      Parameters:
      uri - the URI
      credential - the credential
      Returns:
      a non-null instance
    • directory

      public static net.microfalx.resource.StatefulResource directory(URI uri, net.microfalx.resource.Credential credential)
      Creates a resource with a directory type.
      Parameters:
      uri - the URI
      credential - the credential
      Returns:
      a non-null instance
    • create

      public static net.microfalx.resource.StatefulResource create(URI uri, net.microfalx.resource.Credential credential)
      Creates a resource and auto-detects the type.
      Parameters:
      uri - the URI
      credential - the credential
      Returns:
      a non-null instance
    • create

      public static net.microfalx.resource.StatefulResource create(net.microfalx.resource.Resource.Type type, URI uri, net.microfalx.resource.Credential credential)
      Creates a resource and auto-detects the type.
      Parameters:
      type - the resource type
      uri - the URI
      credential - the credential
      Returns:
      a non-null instance
    • getFileName

      public String getFileName()
    • doExists

      public boolean doExists() throws IOException
      Throws:
      IOException
    • resolve

      public net.microfalx.resource.Resource resolve(String path)
      Specified by:
      resolve in interface net.microfalx.resource.Resource
      Overrides:
      resolve in class net.microfalx.resource.AbstractResource
    • resolve

      public net.microfalx.resource.Resource resolve(String path, net.microfalx.resource.Resource.Type type)
      Specified by:
      resolve in interface net.microfalx.resource.Resource
      Overrides:
      resolve in class net.microfalx.resource.AbstractResource
    • get

      public net.microfalx.resource.Resource get(String path, net.microfalx.resource.Resource.Type type)
    • toURI

      public URI toURI()