Class S3RandomAccessFile

    • Method Detail

      • closeRemote

        public void closeRemote()
        Description copied from interface: ReadableRemoteFile
        Close any resources used to enable remote reading. For example, HTTPSession from httpservices, or S3Client from the AWS SDK
        Specified by:
        closeRemote in interface ReadableRemoteFile
      • readRemote

        public int readRemote​(long pos,
                              byte[] buff,
                              int offset,
                              int len)
                       throws IOException
        Read directly from the remote service All reading goes through here or readToByteChannel; 1. https://docs.aws.amazon.com/AmazonS3/latest/dev/RetrievingObjectUsingJava.html
        Specified by:
        readRemote in interface ReadableRemoteFile
        Parameters:
        pos - start here in the file
        buff - put data into this buffer
        offset - buffer offset
        len - this number of bytes
        Returns:
        actual number of bytes read
        Throws:
        IOException - on io error
      • length

        public long length()
        Description copied from class: RandomAccessFile
        Get the length of the file. The data in the buffer (which may not have been written the disk yet) is taken into account.
        Overrides:
        length in class RandomAccessFile
        Returns:
        the length of the file in bytes.
      • getLastModified

        public long getLastModified()
        Description copied from interface: FileCacheable
        Returns the time that the underlying file(s) were last modified. If they've changed since they were stored in the cache, they will be closed and reopened with FileFactory.
        Specified by:
        getLastModified in interface FileCacheable
        Overrides:
        getLastModified in class RandomAccessFile
        Returns:
        a long value representing the time the file(s) were last modified or 0L if the last-modified time couldn't be determined for any reason.
      • getObjectName

        public String getObjectName()