Package ucar.unidata.io
Interface ReadableRemoteFile
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
HTTPRandomAccessFile
,RemoteRandomAccessFile
,S3RandomAccessFile
public interface ReadableRemoteFile extends Closeable
A remote file that can be read from.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeRemote()
Close any resources used to enable remote reading.int
readRemote(long pos, byte[] buff, int offset, int len)
Read directly from the remote service.
-
-
-
Method Detail
-
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 filebuff
- put data into this bufferoffset
- buffer offsetlen
- 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
-
-