|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webcodepro.applecommander.storage.Disk
com.webcodepro.applecommander.storage.FormattedDisk
com.webcodepro.applecommander.storage.os.prodos.ProdosFormatDisk
public class ProdosFormatDisk
Manages a disk that is in the ProDOS format.
Date created: Oct 3, 2002 11:45:25 PM
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.webcodepro.applecommander.storage.FormattedDisk |
|---|
FormattedDisk.DiskInformation, FormattedDisk.DiskUsage, FormattedDisk.FileColumnHeader |
| Nested classes/interfaces inherited from class com.webcodepro.applecommander.storage.Disk |
|---|
Disk.FilenameFilter |
| Field Summary |
|---|
| Fields inherited from class com.webcodepro.applecommander.storage.FormattedDisk |
|---|
FILE_DISPLAY_DETAIL, FILE_DISPLAY_NATIVE, FILE_DISPLAY_STANDARD |
| Fields inherited from class com.webcodepro.applecommander.storage.Disk |
|---|
APPLE_10MB_HARDDISK, APPLE_140KB_DISK, APPLE_140KB_NIBBLE_DISK, APPLE_20MB_HARDDISK, APPLE_32MB_HARDDISK, APPLE_5MB_HARDDISK, APPLE_800KB_2IMG_DISK, APPLE_800KB_DISK, BLOCK_SIZE, DOS33_SECTORS_ON_140KB_DISK, PRODOS_BLOCKS_ON_140KB_DISK, SECTOR_SIZE |
| Constructor Summary | |
|---|---|
ProdosFormatDisk(java.lang.String filename,
ImageOrder imageOrder)
Constructor for ProdosFormatDisk. |
|
| Method Summary | |
|---|---|
boolean |
canCompile(java.lang.String filetype)
Indicates if this filetype can be compiled. |
boolean |
canCreateDirectories()
Identify if additional directories can be created. |
boolean |
canCreateFile()
Indicates if this disk image can create a file. |
boolean |
canDeleteFile()
Indicates if this disk image can delete a file. |
boolean |
canHaveDirectories()
Identify if this disk format is capable of having directories. |
boolean |
canReadFileData()
Indicates if this disk image can read data from a file. |
boolean |
canWriteFileData()
Indicates if this disk image can write data to a file. |
void |
changeImageOrder(ImageOrder imageOrder)
Change to a different ImageOrder. |
static ProdosFormatDisk[] |
create(java.lang.String filename,
java.lang.String diskName,
ImageOrder imageOrder)
Create a ProdosFormatDisk. |
DirectoryEntry |
createDirectory()
Create a new DirectoryEntry. |
FileEntry |
createFile()
Create a FileEntry in the Volume Directory. |
FileEntry |
createFile(ProdosCommonDirectoryHeader directory)
Create a FileEntry in the given directory. |
com.webcodepro.applecommander.storage.os.prodos.ProdosFormatDisk.ProdosFileType |
findFileType(java.lang.String filetype)
Locate the associated ProdosFileType. |
protected int |
findFreeBlock(byte[] volumeBitmap)
Locate a free block in the Volume Bitmap. |
void |
format()
Format the ProDOS volume. |
protected void |
freeBlocks(ProdosFileEntry prodosFileEntry)
Free blocks used by a DosFileEntry. |
int[] |
getBitmapDimensions()
Get suggested dimensions for display of bitmap. |
java.lang.String[] |
getBitmapLabels()
Get the labels to use in the bitmap. |
int |
getBitmapLength()
Get the length of the bitmap. |
java.util.List |
getDiskInformation()
Get Pascal-specific disk information. |
java.lang.String |
getDiskName()
Return the name of the disk. |
FormattedDisk.DiskUsage |
getDiskUsage()
Get the disk usage iterator. |
java.util.List |
getFileColumnHeaders(int displayMode)
Get the standard file column header information. |
byte[] |
getFileData(FileEntry fileEntry)
Get the data associated with the specified FileEntry. |
java.util.List |
getFiles()
Retrieve a list of files. |
protected java.util.List |
getFiles(int blockNumber)
Build a list of files, starting in the given block number. |
java.lang.String |
getFiletype(int filetype)
Return the filetype of this file. |
byte |
getFiletype(java.lang.String filetype)
Get the numerical filetype. |
java.lang.String[] |
getFiletypes()
Returns a list of possible file types. |
java.lang.String |
getFormat()
Identify the operating system format of this disk. |
int |
getFreeBlocks()
Return the number of free blocks on the disk. |
int |
getFreeSpace()
Return the amount of free space in bytes. |
protected int |
getIndexBlockData(byte[] fileData,
byte[] indexBlock,
int offset)
Read file data from the given index block. |
int |
getLogicalDiskNumber()
Returns the logical disk number. |
java.lang.String |
getSuggestedFilename(java.lang.String filename)
Returns a valid filename for the given filename. |
java.lang.String |
getSuggestedFiletype(java.lang.String filename)
Returns a valid filetype for the given filename. |
int |
getUsedBlocks()
Return the number of used blocks on the disk. |
int |
getUsedSpace()
Return the amount of used space in bytes. |
protected ProdosVolumeDirectoryHeader |
getVolumeHeader()
|
protected void |
initialize()
Initialize all file types. |
boolean |
isBlockFree(byte[] data,
int blockNumber)
Determine if the specified block is free. |
boolean |
isBlockUsed(byte[] data,
int blockNumber)
Determine if the specified block is used. |
boolean |
needsAddress(java.lang.String filetype)
Indicates if this filetype requires an address component. |
byte[] |
readVolumeBitMap()
Read the Volume Bit Map. |
void |
setBlockFree(byte[] data,
int blockNumber)
Set if the specified block is free. |
void |
setBlockUsed(byte[] data,
int blockNumber)
Set if the specified block is free. |
void |
setDiskName(java.lang.String volumeName)
Set the name of the disk (volume name). |
void |
setFileData(FileEntry fileEntry,
byte[] fileData)
Writes the raw bytes into the file. |
protected void |
setFileData(ProdosFileEntry fileEntry,
byte[] fileData)
Set the data associated with the specified ProdosFileEntry into sectors on the disk. |
boolean |
supportsDeletedFiles()
Indicates if this disk format supports "deleted" files. |
boolean |
supportsDiskMap()
Indicates if this FormattedDisk supports a disk map. |
void |
writeVolumeBitMap(byte[] data)
Write the Volume Bit Map. |
| Methods inherited from class com.webcodepro.applecommander.storage.FormattedDisk |
|---|
getFile, getFile, getFormattedDisk, resizeDiskImage, writeBootCode |
| Methods inherited from class com.webcodepro.applecommander.storage.Disk |
|---|
getDiskImageManager, getFilename, getFilenameFilters, getFormattedDisks, getImageOrder, getPhysicalSize, hasChanged, is140KbDisk, is2ImgOrder, is800KbDisk, isCompressed, isCpmFormat, isDosFormat, isDosOrder, isNewImage, isNibbleOrder, isOzDosFormat, isPascalFormat, isProdosFormat, isProdosOrder, isRdosFormat, isUniDosFormat, readBlock, readSector, resizeDiskImage, save, saveAs, setFilename, setImageOrder, writeBlock, writeSector |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProdosFormatDisk(java.lang.String filename,
ImageOrder imageOrder)
filename - | Method Detail |
|---|
protected void initialize()
public static ProdosFormatDisk[] create(java.lang.String filename,
java.lang.String diskName,
ImageOrder imageOrder)
public java.lang.String getFormat()
getFormat in class FormattedDiskFormattedDisk.getFormat()
public FileEntry createFile()
throws DiskFullException
DiskFullException
public FileEntry createFile(ProdosCommonDirectoryHeader directory)
throws DiskFullException
DiskFullExceptionpublic java.util.List getFiles()
DirectoryEntry.getFiles()protected java.util.List getFiles(int blockNumber)
public int getFreeSpace()
getFreeSpace in class FormattedDiskFormattedDisk.getFreeSpace()public int getFreeBlocks()
public int getUsedSpace()
getUsedSpace in class FormattedDiskFormattedDisk.getUsedSpace()public int getUsedBlocks()
public boolean canCreateDirectories()
public boolean canCreateFile()
public java.lang.String getDiskName()
getDiskName in class FormattedDiskFormattedDisk.getDiskName()public void setDiskName(java.lang.String volumeName)
public int[] getBitmapDimensions()
getBitmapDimensions in class FormattedDiskpublic int getBitmapLength()
getBitmapLength in class FormattedDiskpublic FormattedDisk.DiskUsage getDiskUsage()
getDiskUsage in class FormattedDiskpublic java.lang.String[] getBitmapLabels()
getBitmapLabels in class FormattedDiskpublic java.util.List getDiskInformation()
getDiskInformation in class FormattedDiskpublic java.util.List getFileColumnHeaders(int displayMode)
getFileColumnHeaders in class FormattedDiskpublic boolean supportsDeletedFiles()
supportsDeletedFiles in class FormattedDiskpublic boolean canReadFileData()
canReadFileData in class FormattedDiskpublic boolean canHaveDirectories()
canHaveDirectories in class FormattedDiskFormattedDisk.canHaveDirectories()public boolean canWriteFileData()
canWriteFileData in class FormattedDiskpublic boolean canDeleteFile()
canDeleteFile in class FormattedDiskpublic byte[] getFileData(FileEntry fileEntry)
getFileData in class FormattedDiskFileEntry.getFileData()protected void freeBlocks(ProdosFileEntry prodosFileEntry)
protected int getIndexBlockData(byte[] fileData,
byte[] indexBlock,
int offset)
protected void setFileData(ProdosFileEntry fileEntry,
byte[] fileData)
throws DiskFullException
DiskFullException
protected int findFreeBlock(byte[] volumeBitmap)
throws DiskFullException
DiskFullExceptionpublic byte[] readVolumeBitMap()
public void writeVolumeBitMap(byte[] data)
public boolean isBlockFree(byte[] data,
int blockNumber)
public void setBlockFree(byte[] data,
int blockNumber)
public boolean isBlockUsed(byte[] data,
int blockNumber)
public void setBlockUsed(byte[] data,
int blockNumber)
public void format()
format in class FormattedDiskFormattedDisk.format()public int getLogicalDiskNumber()
getLogicalDiskNumber in class FormattedDiskpublic java.lang.String getSuggestedFilename(java.lang.String filename)
getSuggestedFilename in class FormattedDiskpublic java.lang.String getSuggestedFiletype(java.lang.String filename)
getSuggestedFiletype in class FormattedDiskpublic java.lang.String getFiletype(int filetype)
public byte getFiletype(java.lang.String filetype)
public com.webcodepro.applecommander.storage.os.prodos.ProdosFormatDisk.ProdosFileType findFileType(java.lang.String filetype)
public java.lang.String[] getFiletypes()
getFiletypes in class FormattedDiskpublic boolean needsAddress(java.lang.String filetype)
needsAddress in class FormattedDiskpublic boolean canCompile(java.lang.String filetype)
public boolean supportsDiskMap()
supportsDiskMap in class FormattedDiskpublic void changeImageOrder(ImageOrder imageOrder)
changeImageOrder in class FormattedDiskImageOrder
public void setFileData(FileEntry fileEntry,
byte[] fileData)
throws DiskFullException
setFileData in class FormattedDiskDiskFullExceptionprotected ProdosVolumeDirectoryHeader getVolumeHeader()
public DirectoryEntry createDirectory()
throws DiskFullException
DiskFullExceptionDirectoryEntry.createDirectory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||