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.internal.cache.FileCacheable
,ReadableRemoteFile
public abstract class RemoteRandomAccessFile extends RandomAccessFile implements ReadableRemoteFile
An abstract superclass for remote RandomAccessFile.
-
-
Field Summary
-
Fields inherited from class ucar.unidata.io.RandomAccessFile
BIG_ENDIAN, LITTLE_ENDIAN
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the file, and release any associated system resources.long
readToByteChannel(WritableByteChannel dest, long offset, long nbytes)
Readnbytes
bytes, 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, length, order, order, reacquire, 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, release, searchForward, seek, setBufferSize, 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
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.unidata.io.ReadableRemoteFile
closeRemote, readRemote
-
-
-
-
Method Detail
-
readToByteChannel
public long readToByteChannel(WritableByteChannel dest, long offset, long nbytes) throws IOException
Description copied from class:RandomAccessFile
Readnbytes
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.- Overrides:
readToByteChannel
in 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
public void close() throws IOException
Description copied from class:RandomAccessFile
Close the file, and release any associated system resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceucar.nc2.internal.cache.FileCacheable
- Overrides:
close
in classRandomAccessFile
- Throws:
IOException
- if an I/O error occurrs.
-
-