Class BlockToTrackSectorAdapter
java.lang.Object
org.applecommander.device.BlockToTrackSectorAdapter
- All Implemented Interfaces:
CapabilityProvider, Device, TrackSectorDevice, HintProvider, Container, InformationProvider
Adapts a
BlockDevice to a TrackSectorDevice.-
Nested Class Summary
Nested classes/interfaces inherited from interface TrackSectorDevice
TrackSectorDevice.Geometry -
Field Summary
Fields inherited from interface TrackSectorDevice
SECTOR_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBlockToTrackSectorAdapter(BlockDevice device, TrackSectorToBlockStrategy strategy) -
Method Summary
Modifier and TypeMethodDescriptionbooleancan(Capability capability) Helps identify capabilities of the existing component.<T> Optional<T> Get information that describes the disk geometry.Get the sector order.booleanvoidreadSector(int track, int sector, int offset, DataBuffer data) Read a single sector from the disk into the givenDataBufferat the given offset.voidwriteSector(int track, int sector, DataBuffer data) Write a single sector to the disk.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HintProvider
isAnyMethods inherited from interface TrackSectorDevice
calculateRequiredSectors, format, performRange, readRange, readSector, request, sizeBuffer, writeRange
-
Constructor Details
-
BlockToTrackSectorAdapter
-
-
Method Details
-
get
-
is
- Specified by:
isin interfaceHintProvider- Specified by:
isin interfaceTrackSectorDevice
-
can
Description copied from interface:CapabilityProviderHelps identify capabilities of the existing component.- Specified by:
canin interfaceCapabilityProvider
-
getGeometry
Description copied from interface:TrackSectorDeviceGet information that describes the disk geometry.- Specified by:
getGeometryin interfaceTrackSectorDevice
-
getSectorOrder
Get the sector order.- Specified by:
getSectorOrderin interfaceTrackSectorDevice
-
readSector
Read a single sector from the disk into the givenDataBufferat the given offset.- Specified by:
readSectorin interfaceTrackSectorDevice
-
writeSector
Description copied from interface:TrackSectorDeviceWrite a single sector to the disk.- Specified by:
writeSectorin interfaceTrackSectorDevice
-
information
- Specified by:
informationin interfaceInformationProvider
-