Added test to indicate if this entry is empty. Used to determine if this

is a valid entry or unused space.
This commit is contained in:
Robert Greene 2003-03-02 23:07:50 +00:00
parent ced0fba9f2
commit 4652ac9f63
1 changed files with 11 additions and 0 deletions

View File

@ -79,6 +79,17 @@ public class ProdosCommonEntry {
return entry;
}
/**
* Indicates if this entry is empty - filled with $00.
*/
public boolean isEmpty() {
byte[] entry = readFileEntry();
for (int i=0; i<entry.length; i++) {
if (entry[i] != 0x00) return false;
}
return true;
}
/**
* Write the fileEntry data to the disk image.
*/