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. * Create a PascalFormatDisk.
* @param filename
*/ */
public PascalFormatDisk(String filename, String volumeName) { public static PascalFormatDisk[] create(String filename, String volumeName,
super(filename, new byte[APPLE_140KB_DISK]); int size) {
setDiskName(volumeName);
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. * Create a RdosFormatDisk.
* @param filename
* @param diskImage
*/ */
public RdosFormatDisk(String filename) { public static RdosFormatDisk[] create(String filename) {
super(filename, new byte[APPLE_140KB_DISK]); RdosFormatDisk disk =
new RdosFormatDisk(filename, new byte[APPLE_140KB_DISK]);
disk.format();
return new RdosFormatDisk[] { disk };
} }
/** /**