Class Block
java.lang.Object
   |
   +----Block
  -  public class Block
  
-  extends Object
  
An array of bytes.
  -  Author:
  
 -  Ray Ontko
 
  
  -  
	bytes
   -   The array of bytes for this block.
 
  
  -  
	Block()
   -   Construct a block.
  
 -  
	Block(short)
   -   Construct a block with a given block size.
 
  
  -  
	getBlockSize()
   -   Get the block size in bytes for this Block.
  
 -  
	read(RandomAccessFile)
   -   Read a block from a file at the current position.
  
 -  
	setBlockSize(short)
   -   Set the block size in bytes for this Block.
  
 -  
	write(RandomAccessFile)
   -   Write a block to a file at the current position.
 
  
bytes
 public byte bytes[]
  -  The array of bytes for this block.
 
  
Block
 public Block()
  -  Construct a block.
 
Block
 public Block(short blockSize)
  -  Construct a block with a given block size.
  
    -  Parameters:
    
 -  blockSize - the block size in bytes
  
 
 
 
  
setBlockSize
 public void setBlockSize(short newBlockSize)
  -  Set the block size in bytes for this Block.
  
    -  Parameters:
    
 -  newBlockSize - the new block size in bytes
  
 
 
 
getBlockSize
 public short getBlockSize()
  -  Get the block size in bytes for this Block.
  
    -  Returns:
    
 -  the block size in bytes
  
 
 
 
read
 public void read(RandomAccessFile file) throws IOException, EOFException
  -  Read a block from a file at the current position.
  
    -  Parameters:
    
 -  file - the random access file from which to read
    
 -  Throws: EOFException
    
 -  if attempt to read past end of file
    
 -  Throws: IOException
    
 -  if an I/O error occurs
  
 
 
 
write
 public void write(RandomAccessFile file) throws IOException
  -  Write a block to a file at the current position.
  
    -  Parameters:
    
 -  file - the random access file to which to write
    
 -  Throws: IOException
    
 -  if an I/O error occurs