Class S3File


  • public class S3File
    extends java.lang.Object
    S3File aims to provide an abstraction over the Amazon S3 API that acts like java.io.File and provides a stable reference to all the states of an S3 object. Like java.io.File, S3File can refer to an S3 object before it exists, once it is created, after it is updated and after it is deleted. Throughout these various states, callers may simply hold the same S3File instance and expect it will reflect the most current information that has been fetched.
    • Method Detail

      • getPath

        public Path getPath()
      • exists

        public boolean exists()
      • isFile

        public boolean isFile()
      • isDirectory

        public boolean isDirectory()
      • getParentFile

        public S3File getParentFile()
      • getFile

        public S3File getFile​(java.lang.String name)
      • files

        public java.util.stream.Stream<S3File> files()
      • files

        public java.util.stream.Stream<S3File> files​(com.amazonaws.services.s3.model.ListObjectsRequest request)
      • walk

        public java.util.stream.Stream<S3File> walk()
      • walk

        public java.util.stream.Stream<S3File> walk​(int maxDepth)
      • getAbsoluteName

        public java.lang.String getAbsoluteName()
      • getName

        public java.lang.String getName()
      • getBucket

        public S3Bucket getBucket()
      • getValueAsStream

        public com.amazonaws.services.s3.model.S3ObjectInputStream getValueAsStream()
      • getValueAsString

        public java.lang.String getValueAsString()
      • setValueAsStream

        public void setValueAsStream​(java.io.InputStream inputStream)
      • setValueAsFile

        public void setValueAsFile​(java.io.File file)
      • setValueAsString

        public void setValueAsString​(java.lang.String value)
      • getBucketName

        public java.lang.String getBucketName()
      • getETag

        public java.lang.String getETag()
      • getSize

        public long getSize()
      • getLastModified

        public java.util.Date getLastModified()
      • getS3Object

        public com.amazonaws.services.s3.model.S3Object getS3Object()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • delete

        public void delete()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object