jmce - 1_02

jmce.sim.cpm
Class CpmFile

java.lang.Object
  extended by jmce.sim.cpm.CpmFile

public class CpmFile
extends java.lang.Object

CP/M file rappresentation.

The file is very simple only hold the user number, the file name and 2 array one with the allocated data block number and one with the allocated FCB number.

This class rappresent a CP/M file.

Version:
1.01
Author:
Mario Viara

Constructor Summary
CpmFile(int user, java.lang.String name)
          Constructor for new file.
 
Method Summary
 void addBlock(int block)
          Add a new data block to the file.
 void addFCB(int fcb)
          Add a new FCB to the file.
 boolean getAttributeArchive()
          Get the archive attribute.
 boolean getAttributeFifo()
          Return the fifo attribute.
 boolean getAttributeGlobal()
          Return the global attribute.
 boolean getAttributeReadOnly()
          Return the read only attribute.
 int getBlockAt(int i)
          Return the specified data block number
 int getBlockCount()
          Return the number of allocated data block
 int getFCBAt(int i)
          Return the specified FCB number.
 int getFCBCount()
          Return the number of allocated FCBs
 java.lang.String getName()
          Return the file name
 int getUser()
          Return the CP/M user number 0 .. 15
 void setAttributeArchive(boolean mode)
          Set the archive attribute.
 void setAttributeFifo(boolean mode)
          Set the fifo attribute.
 void setAttributeGlobal(boolean mode)
          Set the global attribute.
 void setAttributeReadOnly(boolean mode)
          Set the read only attribute.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CpmFile

public CpmFile(int user,
               java.lang.String name)
Constructor for new file.

Parameters:
user - - User number
name - - File name
Method Detail

addBlock

public void addBlock(int block)
Add a new data block to the file.

Parameters:
block - - Block number

getName

public java.lang.String getName()
Return the file name


getBlockCount

public int getBlockCount()
Return the number of allocated data block


getBlockAt

public int getBlockAt(int i)
Return the specified data block number


addFCB

public void addFCB(int fcb)
Add a new FCB to the file.


getFCBCount

public int getFCBCount()
Return the number of allocated FCBs


getFCBAt

public int getFCBAt(int i)
Return the specified FCB number.


getUser

public int getUser()
Return the CP/M user number 0 .. 15


setAttributeFifo

public void setAttributeFifo(boolean mode)
Set the fifo attribute.

Since:
1.01

getAttributeFifo

public boolean getAttributeFifo()
Return the fifo attribute.

Since:
1.01

setAttributeReadOnly

public void setAttributeReadOnly(boolean mode)
Set the read only attribute.

Since:
1.01

getAttributeReadOnly

public boolean getAttributeReadOnly()
Return the read only attribute.

Since:
1.01

setAttributeGlobal

public void setAttributeGlobal(boolean mode)
Set the global attribute.

Since:
1.01

getAttributeGlobal

public boolean getAttributeGlobal()
Return the global attribute.

Since:
1.01

setAttributeArchive

public void setAttributeArchive(boolean mode)
Set the archive attribute.

Since:
1.01

getAttributeArchive

public boolean getAttributeArchive()
Get the archive attribute.

Since:
1.01

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

jmce - 1_02