public class RandomAccessDirectory extends ucar.unidata.io.RandomAccessFile implements ucar.nc2.util.cache.FileCacheable, Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
RandomAccessDirectory.Provider
Hook into service provider interface to RandomAccessFileProvider.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
bufferSize |
protected List<RandomAccessDirectoryItem> |
children |
allFiles, BIG_ENDIAN, bigEndian, buffer, bufferModified, bufferStart, dataEnd, dataSize, debugAccess, debugLeaks, defaultBufferSize, endOfFile, file, fileChannel, filePosition, LITTLE_ENDIAN, location, openFiles, readonly, showOpen, showRead| Constructor and Description |
|---|
RandomAccessDirectory(String location) |
RandomAccessDirectory(String location,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RandomAccessDirectoryItem |
getFileAtPos(int pos)
Return the directory item containing the specified position
|
List<RandomAccessDirectoryItem> |
getFilesInPath(String path)
Find all files in the store that fall under the given path
|
long |
getLastModified() |
boolean |
isDirectory() |
long |
length() |
protected int |
read_(long pos,
byte[] b,
int offset,
int len) |
long |
readToByteChannel(WritableByteChannel dest,
long offset,
long nbytes) |
protected void |
setFileToPos(long pos)
sets current RandomAccessFile to that containing pos
saves start position on current RAF
|
void |
write(int b)
Not implemented - use write methods on the leaf RandomAccessFile
e.g.
|
void |
writeBytes(byte[] b,
int off,
int len)
Not implemented - use write methods on the leaf RandomAccessFile
e.g.
|
acquire, acquire, eject, enableDefaultGlobalFileCache, flush, getAllFiles, getBufferSize, getDebugLeaks, getDebugNbytes, getDebugNseeks, getFilePointer, getGlobalFileCache, getLocation, getMaxOpenFileCount, getOpenFileCount, getOpenFiles, getRandomAccessFile, isAtEndOfFile, 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, writeBoolean, writeBoolean, writeByte, 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, writeUTFprotected List<RandomAccessDirectoryItem> children
protected int bufferSize
public RandomAccessDirectory(String location) throws IOException
IOExceptionpublic RandomAccessDirectory(String location, int bufferSize) throws IOException
IOExceptionpublic RandomAccessDirectoryItem getFileAtPos(int pos)
pos - public List<RandomAccessDirectoryItem> getFilesInPath(String path) throws IOException
path - IOExceptionprotected void setFileToPos(long pos)
throws IOException
pos - IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ucar.nc2.util.cache.FileCacheableclose in class ucar.unidata.io.RandomAccessFileIOExceptionpublic long getLastModified()
getLastModified in interface ucar.nc2.util.cache.FileCacheablegetLastModified in class ucar.unidata.io.RandomAccessFilepublic boolean isDirectory()
isDirectory in class ucar.unidata.io.RandomAccessFilepublic long length()
length in class ucar.unidata.io.RandomAccessFilepublic long readToByteChannel(WritableByteChannel dest, long offset, long nbytes) throws IOException
readToByteChannel in class ucar.unidata.io.RandomAccessFileIOExceptionprotected int read_(long pos,
byte[] b,
int offset,
int len)
throws IOException
read_ in class ucar.unidata.io.RandomAccessFileIOExceptionpublic void write(int b)
write in interface DataOutputwrite in class ucar.unidata.io.RandomAccessFilepublic void writeBytes(byte[] b,
int off,
int len)
writeBytes in class ucar.unidata.io.RandomAccessFile