-
- All Implemented Interfaces:
-
com.github.mjdev.libaums.driver.BlockDeviceDriver
public final class Partition extends ByteBlockDevice
This class represents a partition on an mass storage device. A partition has a certain file system which can be accessed via .getFileSystem. This file system is needed to to access the files and directories of a partition.
The method .getVolumeLabel returns the volume label for the partition. Calling the method is equivalent to calling FileSystem.getVolumeLabel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPartition.Companion
-
Field Summary
Fields Modifier and Type Field Description private FileSystemfileSystemprivate final StringvolumeLabelprivate final IntegerblockSizeprivate final Longblocks
-
Constructor Summary
Constructors Constructor Description Partition(BlockDeviceDriver blockDevice, PartitionTableEntry entry)
-
Method Summary
Modifier and Type Method Description final FileSystemgetFileSystem()final UnitsetFileSystem(FileSystem fileSystem)final StringgetVolumeLabel()IntegergetBlockSize()Returns the block size of the block device. LonggetBlocks()The size of the block device, in blocks of blockSize bytes, -
-
Constructor Detail
-
Partition
Partition(BlockDeviceDriver blockDevice, PartitionTableEntry entry)
-
-
Method Detail
-
getFileSystem
final FileSystem getFileSystem()
-
setFileSystem
final Unit setFileSystem(FileSystem fileSystem)
-
getVolumeLabel
final String getVolumeLabel()
-
getBlockSize
Integer getBlockSize()
Returns the block size of the block device. Every block device can only read and store bytes in a specific block with a certain size.
That means that it is only possible to read or write whole blocks!
-
-
-
-