Package com.github.mjdev.libaums.fs
Class FileSystemFactory
- java.lang.Object
-
- com.github.mjdev.libaums.fs.FileSystemFactory
-
public class FileSystemFactory extends java.lang.ObjectThis is a helper class to create different supported file systems. The file system is determined by {linkPartitionTableEntry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileSystemFactory.UnsupportedFileSystemException
-
Constructor Summary
Constructors Constructor Description FileSystemFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileSystemcreateFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice)static java.util.TimeZonegetTimeZone()static voidregisterFileSystem(FileSystemCreator creator)Register a new file system.static voidsetTimeZone(java.util.TimeZone zone)Set the timezone a file system should use to decode timestamps, if the file system only stores local date and time and has no reference which zone these timestamp correspond to.
-
-
-
Method Detail
-
createFileSystem
public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws java.io.IOException, FileSystemFactory.UnsupportedFileSystemException
- Throws:
java.io.IOExceptionFileSystemFactory.UnsupportedFileSystemException
-
registerFileSystem
public static void registerFileSystem(FileSystemCreator creator)
Register a new file system.- Parameters:
creator- The creator which is able to check if aBlockDeviceDriveris holding the correct type of file system and is able to instantiate aFileSysteminstance.
-
setTimeZone
public static void setTimeZone(java.util.TimeZone zone)
Set the timezone a file system should use to decode timestamps, if the file system only stores local date and time and has no reference which zone these timestamp correspond to. (True for FAT32, e.g.)- Parameters:
zone- The timezone to use.
-
getTimeZone
public static java.util.TimeZone getTimeZone()
-
-