|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiitb.con.util.ArrayFreeSpaceList
public class ArrayFreeSpaceList
ArrayFreeSpaceList is the list which maintains the information about the free blocks in a file.
The format of the list is : {[Start Location], [End Location]}
where the start location and end location indicates the block start and end in the file.
| Constructor Summary | |
|---|---|
ArrayFreeSpaceList(java.lang.String fileName,
java.lang.String mode)
Reads and initializes the information about the free blocks space |
|
| Method Summary | |
|---|---|
void |
close()
Closes the free space list file |
void |
commit()
Commits the changes to the free space list file |
void |
dumpFreeSpaceList()
Dumps the free space list contents |
boolean |
freeTheBlock(long location,
long size)
Frees the specified block in the file |
long |
getFreeBlock(long size)
Returns the free block location |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayFreeSpaceList(java.lang.String fileName,
java.lang.String mode)
throws java.io.FileNotFoundException,
java.io.IOException
fileName - free space list file namemode - opening mode (r, rw)
java.io.FileNotFoundException - if file not found
java.io.IOException - if file operation fails| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface FreeSpaceListjava.io.IOException - if file operation fails
public void commit()
throws java.io.IOException
commit in interface FreeSpaceListjava.io.IOException - if file operation failspublic void dumpFreeSpaceList()
public boolean freeTheBlock(long location,
long size)
freeTheBlock in interface FreeSpaceListlocation - block locationsize - block size
public long getFreeBlock(long size)
getFreeBlock in interface FreeSpaceListsize - request block size
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||