public final class S3RandomAccessFile extends RemoteRandomAccessFile implements ReadableRemoteFile, java.io.Closeable
RandomAccessFile
and RemoteRandomAccessFile
for
objects stored on AWS S3 compatible Object Stores.Modifier and Type | Class and Description |
---|---|
static class |
S3RandomAccessFile.Provider
Hook into service provider interface to RandomAccessFileProvider.
|
defaultMaxReadCacheSize, defaultRemoteFileBufferSize, defaultRemoteFileTimeout, url
allFiles, BIG_ENDIAN, bigEndian, buffer, bufferModified, bufferStart, dataEnd, dataSize, debugAccess, debugLeaks, defaultBufferSize, endOfFile, file, fileChannel, filePosition, LITTLE_ENDIAN, location, openFiles, readonly, showOpen, showRead
Modifier and Type | Method and Description |
---|---|
void |
closeRemote()
Close any resources used to enable remote reading.
|
long |
getLastModified()
Returns the time that the underlying file(s) were last modified.
|
java.lang.String |
getLocation()
Get the file location, or name.
|
java.lang.String |
getObjectName() |
long |
length()
Get the length of the file.
|
int |
readRemote(long pos,
byte[] buff,
int offset,
int len)
Read directly from the remote service All reading goes through here or readToByteChannel;
1.
|
close, read_, readToByteChannel
acquire, acquire, eject, enableDefaultGlobalFileCache, flush, getAllFiles, getBufferSize, getDebugLeaks, getDebugNbytes, getDebugNseeks, getFilePointer, getGlobalFileCache, getMaxOpenFileCount, getOpenFileCount, getOpenFiles, getRandomAccessFile, isAtEndOfFile, isDirectory, order, order, reacquire, read, read, read, readBoolean, readBuffer, readByte, readBytes, readBytes, readChar, readDouble, readDouble, readFloat, readFloat, readFully, readFully, readInt, readInt, readIntUnbuffered, readLine, readLine, readLong, readLong, readShort, readShort, readString, readString, readStringMax, readStringMax, readUnsignedByte, readUnsignedShort, readUTF, release, searchForward, seek, setBufferSize, setDebugAccess, setDebugLeaks, setExtendMode, setFileCache, setGlobalFileCache, setMinLength, shutdown, skipBytes, skipBytes, toString, unread, write, write, write, writeBoolean, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeChar, writeChar, writeChar, writeChar, writeChar, writeChar, writeChars, writeChars, writeChars, writeDouble, writeDouble, writeDouble, writeDouble, writeDouble, writeDouble, writeFloat, writeFloat, writeFloat, writeFloat, writeFloat, writeFloat, writeInt, writeInt, writeInt, writeInt, writeInt, writeInt, writeLong, writeLong, writeLong, writeLong, writeLong, writeLong, writeShort, writeShort, writeShort, writeShort, writeShort, writeShort, writeUTF
public void closeRemote()
ReadableRemoteFile
closeRemote
in interface ReadableRemoteFile
public int readRemote(long pos, byte[] buff, int offset, int len) throws java.io.IOException
readRemote
in interface ReadableRemoteFile
pos
- start here in the filebuff
- put data into this bufferoffset
- buffer offsetlen
- this number of bytesjava.io.IOException
- on io errorpublic long length()
RandomAccessFile
length
in class RandomAccessFile
public long getLastModified()
FileCacheable
FileFactory
.getLastModified
in interface FileCacheable
getLastModified
in class RandomAccessFile
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.public java.lang.String getLocation()
RandomAccessFile
getLocation
in interface FileCacheable
getLocation
in class RandomAccessFile
public java.lang.String getObjectName()