Added ability to set values; work is done from readFileEntry and

writeFileEntry.
This commit is contained in:
Robert Greene 2002-12-12 01:55:36 +00:00
parent 6f3ef71add
commit 4b037eb100

View File

@ -31,14 +31,23 @@ public class ProdosVolumeDirectoryHeader extends ProdosCommonDirectoryHeader {
* Constructor for ProdosVolumeDirectoryHeaderEntry.
* @param fileEntry
*/
public ProdosVolumeDirectoryHeader(byte[] fileEntry) {
super(fileEntry);
public ProdosVolumeDirectoryHeader(ProdosFormatDisk disk) {
super(disk, 2);
}
/**
* Return the name of this volume.
*/
public String getVolumeName() {
return AppleUtil.getProdosString(getFileEntry(), 0);
return AppleUtil.getProdosString(readFileEntry(), 0);
}
/**
* Set the name of this volume.
*/
public void setVolumeName(String volumeName) {
byte[] data = readFileEntry();
AppleUtil.setProdosString(data, 0, volumeName.toUpperCase(), 15);
writeFileEntry(data);
}
}