public abstract class RemoteRandomAccessFile extends RandomAccessFile implements ReadableRemoteFile
Modifier and Type | Field and Description |
---|---|
protected static long |
defaultMaxReadCacheSize |
protected static int |
defaultRemoteFileBufferSize |
protected static int |
defaultRemoteFileTimeout |
protected java.lang.String |
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 | Constructor and Description |
---|---|
protected |
RemoteRandomAccessFile(java.lang.String url,
int bufferSize,
long maxRemoteCacheSize) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the file, and release any associated system resources.
|
protected int |
read_(long pos,
byte[] buff,
int offset,
int len)
Read data into the buffer, and return number of bytes read.
|
long |
readToByteChannel(java.nio.channels.WritableByteChannel dest,
long offset,
long nbytes)
Read
nbytes bytes, at the specified file offset, send to a WritableByteChannel. |
acquire, acquire, eject, enableDefaultGlobalFileCache, flush, getAllFiles, getBufferSize, getDebugLeaks, getDebugNbytes, getDebugNseeks, getFilePointer, getGlobalFileCache, getLastModified, getLocation, getMaxOpenFileCount, getOpenFileCount, getOpenFiles, getRandomAccessFile, isAtEndOfFile, isDirectory, length, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
closeRemote, readRemote
protected static final long defaultMaxReadCacheSize
protected static final int defaultRemoteFileBufferSize
protected static final int defaultRemoteFileTimeout
protected final java.lang.String url
protected RemoteRandomAccessFile(java.lang.String url, int bufferSize, long maxRemoteCacheSize)
protected int read_(long pos, byte[] buff, int offset, int len) throws java.io.IOException
read_
in class RandomAccessFile
pos
- start here in the filebuff
- put data into this bufferoffset
- buffer offsetlen
- this number of bytesjava.io.IOException
- on io errorpublic long readToByteChannel(java.nio.channels.WritableByteChannel dest, long offset, long nbytes) throws java.io.IOException
RandomAccessFile
nbytes
bytes, at the specified file offset, send to a WritableByteChannel.
This will block until all bytes are read.
This uses the underlying file channel directly, bypassing all user buffers.readToByteChannel
in class RandomAccessFile
dest
- write to this WritableByteChannel.offset
- the offset in the file where copying will start.nbytes
- the number of bytes to read.java.io.IOException
- if an I/O error occurs.public void close() throws java.io.IOException
RandomAccessFile
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface FileCacheable
close
in class RandomAccessFile
java.io.IOException
- if an I/O error occurrs.