ch.claudio.fat
Class MBR

java.lang.Object
  extended by ch.claudio.fat.MBR

public class MBR
extends java.lang.Object

Version:
$Id:$
Author:
Claudio Nieder

Copyright (C) 2007 Claudio Nieder <private@claudio.ch>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Field Summary
 int blkSize
          block entrySize
 int blockCount
           
 int blockPerCluster
           
 int blocksPerFat
           
 int bootSignature
           
 int currentFat
           
 int drive
           
 int fats
           
 java.lang.String fsid
          filesystem partitionType
 java.lang.String fsId
           
 int fsinfoblock
           
 int hiddenSectors
           
 java.lang.String label
          volume label
 int maxRootDirs
           
 int mbrcopyBlock
           
 int media
           
 java.lang.String oem
          volume label
 boolean ok
          True if boot record
 PartitionEntry[] partitions
          Partitions
 int reservedSectors
           
 int revision
           
 int rootDirCluster
          Start of root directory
 int sectorCount
           
 int sectorsPerFat
           
 int sectorsPerTrack
           
 int serial
           
 int signature
           
 int tracksPerCylinder
           
 
Constructor Summary
MBR()
           
 
Method Summary
static MBR create(byte[] b)
          Create a new boot record out of a block's data
 void fillin(byte[] b)
          Initialise with data from block
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ok

public boolean ok
True if boot record


oem

public java.lang.String oem
volume label


fsid

public java.lang.String fsid
filesystem partitionType


label

public java.lang.String label
volume label


blkSize

public int blkSize
block entrySize


rootDirCluster

public int rootDirCluster
Start of root directory


blockPerCluster

public int blockPerCluster

reservedSectors

public int reservedSectors

fats

public int fats

maxRootDirs

public int maxRootDirs

sectorCount

public int sectorCount

media

public int media

sectorsPerFat

public int sectorsPerFat

sectorsPerTrack

public int sectorsPerTrack

tracksPerCylinder

public int tracksPerCylinder

hiddenSectors

public int hiddenSectors

blockCount

public int blockCount

blocksPerFat

public int blocksPerFat

currentFat

public int currentFat

revision

public int revision

fsinfoblock

public int fsinfoblock

mbrcopyBlock

public int mbrcopyBlock

drive

public int drive

signature

public int signature

serial

public int serial

fsId

public java.lang.String fsId

bootSignature

public int bootSignature

partitions

public PartitionEntry[] partitions
Partitions

Constructor Detail

MBR

public MBR()
Method Detail

fillin

public void fillin(byte[] b)
            throws java.io.UnsupportedEncodingException
Initialise with data from block

Parameters:
b -
Throws:
java.io.UnsupportedEncodingException

create

public static MBR create(byte[] b)
                  throws java.io.UnsupportedEncodingException
Create a new boot record out of a block's data

Parameters:
b - block
Returns:
boot record
Throws:
java.io.UnsupportedEncodingException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()