public class IndexFile extends Object
| Modifier and Type | Field and Description |
|---|---|
static float |
GOLDEN_RATIO |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying random access file.
|
void |
delete(IndexData indexData)
Deletes the block of the given metaData.
|
void |
delete(int blockNum)
Deletes the given block.
|
int |
getNumAllocated()
Gets the number of allocated blocks.
|
Collection<IndexData> |
initialize() |
long |
length()
Returns the length of the underlying random access file.
|
IndexData |
write(IndexData indexData) |
public IndexFile(File file) throws FileNotFoundException
FileNotFoundExceptionpublic void close()
throws IOException
IOExceptionpublic void delete(IndexData indexData) throws IOException
IOExceptionpublic void delete(int blockNum)
throws IOException
IOExceptionpublic int getNumAllocated()
public Collection<IndexData> initialize() throws IOException
IOExceptionpublic long length()
throws IOException
IOExceptionpublic IndexData write(IndexData indexData) throws IOException
IOExceptionCopyright © 2013 dontdrinkandroot. All Rights Reserved.