Class SuperBlock

java.lang.Object
   |
   +----SuperBlock

public class SuperBlock
extends Object
Author:
Ray Ontko

Constructor Index

 o SuperBlock()
Construct a SuperBlock.

Method Index

 o getBlocks()
 o getBlockSize()
 o getDataBlockOffset()
Get the dataBlockOffset (in blocks)
 o getFreeListBlockOffset()
Get the free list block offset
 o getInodeBlockOffset()
Get the inode block offset (in blocks)
 o read(RandomAccessFile)
reads this SuperBlock at the current position of the specified file.
 o setBlocks(int)
 o setBlockSize(short)
 o setDataBlockOffset(int)
Set the dataBlockOffset (in blocks)
 o setFreeListBlockOffset(int)
Set the freeListBlockOffset (in blocks)
 o setInodeBlockOffset(int)
Set the inodeBlockOffset (in blocks)
 o write(RandomAccessFile)
writes this SuperBlock at the current position of the specified file.

Constructors

 o SuperBlock
 public SuperBlock()
Construct a SuperBlock.

Methods

 o setBlockSize
 public void setBlockSize(short newBlockSize)
 o getBlockSize
 public short getBlockSize()
 o setBlocks
 public void setBlocks(int newBlocks)
 o getBlocks
 public int getBlocks()
 o setFreeListBlockOffset
 public void setFreeListBlockOffset(int newFreeListBlockOffset)
Set the freeListBlockOffset (in blocks)

Parameters:
newFreeListBlockOffset - the new offset in blocks
 o getFreeListBlockOffset
 public int getFreeListBlockOffset()
Get the free list block offset

Returns:
the free list block offset
 o setInodeBlockOffset
 public void setInodeBlockOffset(int newInodeBlockOffset)
Set the inodeBlockOffset (in blocks)

Parameters:
newInodeBlockOffset - the new offset in blocks
 o getInodeBlockOffset
 public int getInodeBlockOffset()
Get the inode block offset (in blocks)

Returns:
inode block offset in blocks
 o setDataBlockOffset
 public void setDataBlockOffset(int newDataBlockOffset)
Set the dataBlockOffset (in blocks)

Parameters:
newDataBlockOffset - the new offset in blocks
 o getDataBlockOffset
 public int getDataBlockOffset()
Get the dataBlockOffset (in blocks)

Returns:
the offset in blocks to the data block region
 o write
 public void write(RandomAccessFile file) throws IOException
writes this SuperBlock at the current position of the specified file.

 o read
 public void read(RandomAccessFile file) throws IOException
reads this SuperBlock at the current position of the specified file.