Class MasterBootRecord

  • All Implemented Interfaces:
    PartitionTable

    public class MasterBootRecord
    extends java.lang.Object
    implements PartitionTable
    This class represents the Master Boot Record (MBR), which is a partition table used by most block devices coming from Windows or Unix.
    • Method Detail

      • read

        public static MasterBootRecord read​(java.nio.ByteBuffer buffer)
                                     throws java.io.IOException
        Reads and parses the MBR located in the buffer.
        Parameters:
        buffer - The data which shall be examined.
        Returns:
        A new MasterBootRecord() or null if the data does not seem to be a MBR.
        Throws:
        java.io.IOException
      • getSize

        public int getSize()
        Specified by:
        getSize in interface PartitionTable
        Returns:
        The size in bytes the partition table occupies.