|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webcodepro.applecommander.storage.Disk com.webcodepro.applecommander.storage.FormattedDisk com.webcodepro.applecommander.storage.os.cpm.CpmFormatDisk
public class CpmFormatDisk
Manages a disk that is in the Apple CP/M format.
Nested Class Summary | |
---|---|
class |
CpmFormatDisk.CpmDiskUsage
Manage CP/M disk usage. |
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 | |
---|---|
static int |
CPM_BLOCKS_PER_TRACK
The number of CP/M blocks per physical track. |
static int |
CPM_BLOCKSIZE
The size of a CP/M block. |
static int |
CPM_SECTORS_PER_CPM_BLOCK
The number of CP/M sectors per CP/M block. |
static int |
CPM_SECTORSIZE
The size of the CP/M sector. |
static int |
PHYSICAL_BLOCK_TRACK_START
The track number which CP/M block #0 resides at. |
static int |
PHYSICAL_SECTORS_PER_BLOCK
The number of physical sectors per CP/M block. |
static int[] |
sectorSkew
The sector skew of the CP/M disk image. |
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 | |
---|---|
CpmFormatDisk(java.lang.String filename,
ImageOrder imageOrder)
Construct a CP/M formatted disk. |
Method Summary | |
---|---|
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. |
protected int |
computeSector(int block)
Compute the physical sector number. |
protected int |
computeTrack(int block)
Compute the physical track number. |
static CpmFormatDisk[] |
create(java.lang.String filename,
ImageOrder imageOrder)
Create a CpmFormatDisk. |
DirectoryEntry |
createDirectory()
Create a new DirectoryEntry. |
FileEntry |
createFile()
Create a new FileEntry. |
void |
format()
Format the disk. |
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. |
int |
getBlocksUsed()
Compute the number of CP/M blocks that are currently used. |
java.lang.String |
getDiskName()
There apparantly is no corresponding CP/M disk name. |
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()
Answer with a list of file entries. |
java.lang.String[] |
getFiletypes()
Returns a list of possible file types. |
java.lang.String |
getFormat()
Identify the operating system format of this disk. |
int |
getFreeSpace()
Return the amount of free space in bytes. |
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 filetype)
Returns a valid filetype for the given filename. |
int |
getUsedSpace()
Return the amount of used space in bytes. |
boolean |
needsAddress(java.lang.String filetype)
Indicates if this filetype requires an address component. |
byte[] |
readCpmBlock(int block)
Read a CP/M block (1K in size). |
void |
setFileData(FileEntry fileEntry,
byte[] fileData)
Writes the raw bytes into the file. |
boolean |
supportsDeletedFiles()
Indicates if this disk format supports "deleted" files. |
boolean |
supportsDiskMap()
Indicates if this FormattedDisk supports a disk map. |
void |
writeCpmBlock(int block,
byte[] data)
Write a CP/M block. |
Methods inherited from class com.webcodepro.applecommander.storage.FormattedDisk |
---|
getDiskInformation, 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 |
Field Detail |
---|
public static final int CPM_SECTORSIZE
public static final int CPM_BLOCKSIZE
public static final int CPM_SECTORS_PER_CPM_BLOCK
public static final int CPM_BLOCKS_PER_TRACK
public static final int PHYSICAL_SECTORS_PER_BLOCK
public static final int PHYSICAL_BLOCK_TRACK_START
public static final int[] sectorSkew
Constructor Detail |
---|
public CpmFormatDisk(java.lang.String filename, ImageOrder imageOrder)
Method Detail |
---|
public static CpmFormatDisk[] create(java.lang.String filename, ImageOrder imageOrder)
public java.lang.String getDiskName()
getDiskName
in class FormattedDisk
FormattedDisk.getDiskName()
public java.lang.String getFormat()
getFormat
in class FormattedDisk
FormattedDisk.getFormat()
public int getFreeSpace()
getFreeSpace
in class FormattedDisk
FormattedDisk.getFreeSpace()
public int getUsedSpace()
getUsedSpace
in class FormattedDisk
FormattedDisk.getUsedSpace()
public int getBlocksUsed()
public int[] getBitmapDimensions()
getBitmapDimensions
in class FormattedDisk
FormattedDisk.getBitmapDimensions()
public int getBitmapLength()
getBitmapLength
in class FormattedDisk
FormattedDisk.getBitmapLength()
public FormattedDisk.DiskUsage getDiskUsage()
getDiskUsage
in class FormattedDisk
FormattedDisk.getDiskUsage()
public java.lang.String[] getBitmapLabels()
getBitmapLabels
in class FormattedDisk
FormattedDisk.getBitmapLabels()
public boolean supportsDeletedFiles()
supportsDeletedFiles
in class FormattedDisk
FormattedDisk.supportsDeletedFiles()
public boolean canReadFileData()
canReadFileData
in class FormattedDisk
FormattedDisk.canReadFileData()
public boolean canWriteFileData()
canWriteFileData
in class FormattedDisk
FormattedDisk.canWriteFileData()
public boolean canHaveDirectories()
canHaveDirectories
in class FormattedDisk
FormattedDisk.canHaveDirectories()
public boolean canDeleteFile()
canDeleteFile
in class FormattedDisk
FormattedDisk.canDeleteFile()
public byte[] getFileData(FileEntry fileEntry)
getFileData
in class FormattedDisk
FormattedDisk.getFileData(com.webcodepro.applecommander.storage.FileEntry)
public void format()
Note: Assumes that this is a 140K CP/M disk of 35 tracks and 16 physical sectors.
format
in class FormattedDisk
FormattedDisk.format()
public int getLogicalDiskNumber()
getLogicalDiskNumber
in class FormattedDisk
FormattedDisk.getLogicalDiskNumber()
public java.lang.String getSuggestedFilename(java.lang.String filename)
getSuggestedFilename
in class FormattedDisk
FormattedDisk.getSuggestedFilename(java.lang.String)
public java.lang.String getSuggestedFiletype(java.lang.String filetype)
getSuggestedFiletype
in class FormattedDisk
FormattedDisk.getSuggestedFiletype(java.lang.String)
public java.lang.String[] getFiletypes()
getFiletypes
in class FormattedDisk
FormattedDisk.getFiletypes()
public boolean needsAddress(java.lang.String filetype)
needsAddress
in class FormattedDisk
FormattedDisk.needsAddress(java.lang.String)
public java.util.List getFiles()
DirectoryEntry.getFiles()
public FileEntry createFile() throws DiskFullException
DiskFullException
DirectoryEntry.createFile()
public boolean canCreateDirectories()
DirectoryEntry.canCreateDirectories()
public boolean canCreateFile()
DirectoryEntry.canCreateFile()
public byte[] readCpmBlock(int block)
protected int computeTrack(int block)
protected int computeSector(int block)
public void writeCpmBlock(int block, byte[] data)
public java.util.List getFileColumnHeaders(int displayMode)
getFileColumnHeaders
in class FormattedDisk
public boolean supportsDiskMap()
supportsDiskMap
in class FormattedDisk
public void changeImageOrder(ImageOrder imageOrder)
changeImageOrder
in class FormattedDisk
ImageOrder
public void setFileData(FileEntry fileEntry, byte[] fileData) throws DiskFullException
setFileData
in class FormattedDisk
DiskFullException
public DirectoryEntry createDirectory() throws DiskFullException
DiskFullException
DirectoryEntry.createDirectory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |