Changed disk creation to use a create method, as this is better

suited to disks that support mutiple logical disks.
This commit is contained in:
Robert Greene 2002-12-17 05:26:24 +00:00
parent 9170e98435
commit 10d7b000d1
2 changed files with 14 additions and 10 deletions

View File

@ -93,12 +93,15 @@ public class PascalFormatDisk extends FormattedDisk {
}
/**
* Constructor for PascalFormatDisk.
* @param filename
* Create a PascalFormatDisk.
*/
public PascalFormatDisk(String filename, String volumeName) {
super(filename, new byte[APPLE_140KB_DISK]);
setDiskName(volumeName);
public static PascalFormatDisk[] create(String filename, String volumeName,
int size) {
PascalFormatDisk disk = new PascalFormatDisk(filename, new byte[size]);
disk.setDiskName(volumeName);
disk.format();
return new PascalFormatDisk[] { disk };
}
/**

View File

@ -121,12 +121,13 @@ public class RdosFormatDisk extends FormattedDisk {
}
/**
* Constructor for RdosFormatDisk.
* @param filename
* @param diskImage
* Create a RdosFormatDisk.
*/
public RdosFormatDisk(String filename) {
super(filename, new byte[APPLE_140KB_DISK]);
public static RdosFormatDisk[] create(String filename) {
RdosFormatDisk disk =
new RdosFormatDisk(filename, new byte[APPLE_140KB_DISK]);
disk.format();
return new RdosFormatDisk[] { disk };
}
/**