Package net.microfalx.resource.s3
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 ClassesNested 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 TypeMethodDescriptionstatic net.microfalx.resource.StatefulResourceCreates a resource and auto-detects the type.static net.microfalx.resource.StatefulResourcecreate(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.StatefulResourceCreates a resource with a directory type.booleandoExists()static net.microfalx.resource.StatefulResourceCreates a resource with a file type.net.microfalx.resource.Resourcenet.microfalx.resource.Resourcenet.microfalx.resource.ResourcetoURI()Methods inherited from class net.microfalx.resource.AbstractStatefulResource
closeMethods 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, withNameMethods 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 URIcredential- 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 URIcredential- 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 URIcredential- 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 typeuri- the URIcredential- the credential- Returns:
- a non-null instance
-
getFileName
-
doExists
- Throws:
IOException
-
resolve
- Specified by:
resolvein interfacenet.microfalx.resource.Resource- Overrides:
resolvein classnet.microfalx.resource.AbstractResource
-
resolve
public net.microfalx.resource.Resource resolve(String path, net.microfalx.resource.Resource.Type type) - Specified by:
resolvein interfacenet.microfalx.resource.Resource- Overrides:
resolvein classnet.microfalx.resource.AbstractResource
-
get
-
toURI
-