|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.waldheinz.fs.fat.SuperFloppyFormatter
public final class SuperFloppyFormatter
Allows to create FAT file systems on BlockDevice
s which follow the
"super floppy" standard. This means that the device will be formatted so
that it does not contain a partition table. Instead, the entire device holds
a single FAT file system.
This class follows the "builder" pattern, which means it's methods always
returns the SuperFloppyFormatter
instance they're called on. This
allows to chain the method calls like this:
BlockDevice dev = new RamDisk(16700000); FatFileSystem fs = SuperFloppyFormatter.get(dev). setFatType(FatType.FAT12).format();
Field Summary | |
---|---|
static int |
DEFAULT_FAT_COUNT
The default number of FATs. |
static int |
DEFAULT_HEADS
The default number of heads. |
static String |
DEFAULT_OEM_NAME
The default OEM name for file systems created by this class. |
static int |
DEFAULT_SECTORS_PER_TRACK
The default number of sectors per track. |
static int |
DEFULT_HEADS
Deprecated. the name of this constant was mistyped |
static int |
MEDIUM_DESCRIPTOR_HD
The media descriptor used (hard disk). |
Method Summary | |
---|---|
FatFileSystem |
format()
Initializes the boot sector and file system for the device. |
static SuperFloppyFormatter |
get(BlockDevice dev)
Retruns a SuperFloppyFormatter instance suitable for formatting
the specified device. |
FatType |
getFatType()
Returns the exact type of FAT the will be created by this formatter. |
String |
getOemName()
Returns the OEM name that will be written to the BootSector . |
String |
getVolumeLabel()
Returns the volume label that will be given to the new file system. |
SuperFloppyFormatter |
setFatType(FatType fatType)
Sets the type of FAT that will be created by this SuperFloppyFormatter . |
SuperFloppyFormatter |
setOemName(String oemName)
Sets the OEM name of the boot sector. |
SuperFloppyFormatter |
setVolumeLabel(String label)
Sets the volume label of the file system to create. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MEDIUM_DESCRIPTOR_HD
public static final int DEFAULT_FAT_COUNT
public static final int DEFAULT_SECTORS_PER_TRACK
public static final int DEFAULT_HEADS
@Deprecated public static final int DEFULT_HEADS
DEFAULT_HEADS
,
Constant Field Valuespublic static final String DEFAULT_OEM_NAME
Method Detail |
---|
public static SuperFloppyFormatter get(BlockDevice dev) throws IOException
SuperFloppyFormatter
instance suitable for formatting
the specified device.
dev
- the device that should be formatted
IOException
- on error creating the formatterpublic String getOemName()
BootSector
.
public SuperFloppyFormatter setOemName(String oemName)
oemName
- the new OEM name
SuperFloppyFormatter
BootSector.setOemName(java.lang.String)
public SuperFloppyFormatter setVolumeLabel(String label)
label
- the new file system label, may be null
SuperFloppyFormatter
FatFileSystem.setVolumeLabel(java.lang.String)
public String getVolumeLabel()
null
FatFileSystem.getVolumeLabel()
public FatFileSystem format() throws IOException
IOException
- on write errorpublic FatType getFatType()
public SuperFloppyFormatter setFatType(FatType fatType) throws IOException, IllegalArgumentException
SuperFloppyFormatter
.
fatType
- the desired FatType
SuperFloppyFormatter
IOException
- on error setting the fatType
IllegalArgumentException
- if fatType
does not support the
size of the device
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |