Package ucar.unidata.io
Class RemoteRandomAccessFile
java.lang.Object
ucar.unidata.io.RandomAccessFile
ucar.unidata.io.RemoteRandomAccessFile
- All Implemented Interfaces:
Closeable,DataInput,DataOutput,AutoCloseable,ucar.nc2.util.cache.FileCacheable,ReadableRemoteFile
An abstract superclass for remote RandomAccessFile
-
Field Summary
Fields inherited from class ucar.unidata.io.RandomAccessFile
BIG_ENDIAN, LITTLE_ENDIAN -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the file, and release any associated system resources.longreadToByteChannel(WritableByteChannel dest, long offset, long nbytes) Readnbytesbytes, at the specified file offset, send to a WritableByteChannel.Methods inherited from class ucar.unidata.io.RandomAccessFile
acquire, acquire, eject, enableDefaultGlobalFileCache, flush, getBufferSize, getFilePointer, getGlobalFileCache, getLastModified, getLocation, getRandomAccessFile, isAtEndOfFile, isDirectory, length, order, order, read, read, read, readBoolean, 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, searchForward, seek, setBufferSize, setExtendMode, 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, writeUTFMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ucar.nc2.util.cache.FileCacheable
reacquire, release, setFileCacheMethods inherited from interface ucar.unidata.io.ReadableRemoteFile
closeRemote, readRemote
-
Method Details
-
readToByteChannel
public long readToByteChannel(WritableByteChannel dest, long offset, long nbytes) throws IOException Description copied from class:RandomAccessFileReadnbytesbytes, 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.- Overrides:
readToByteChannelin classRandomAccessFile- Parameters:
dest- write to this WritableByteChannel.offset- the offset in the file where copying will start.nbytes- the number of bytes to read.- Returns:
- the actual number of bytes read and transfered
- Throws:
IOException- if an I/O error occurs.
-
close
Description copied from class:RandomAccessFileClose the file, and release any associated system resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceucar.nc2.util.cache.FileCacheable- Overrides:
closein classRandomAccessFile- Throws:
IOException- if an I/O error occurrs.
-