Interface ReadableRemoteFile

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
RemoteRandomAccessFile

public interface ReadableRemoteFile extends Closeable
A remote file that can be read from.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close any resources used to enable remote reading.
    int
    readRemote(long pos, byte[] buff, int offset, int len)
    Read directly from the remote service.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • readRemote

      int readRemote(long pos, byte[] buff, int offset, int len) throws IOException
      Read directly from the remote service. For HTTP based access, this is where "Accept-Ranges" HTTP requests are called to do random access
      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
    • closeRemote

      void closeRemote()
      Close any resources used to enable remote reading. For example, HTTPSession from httpservices, or S3Client from the AWS SDK