@Test public void createFat32FileSystem() throws Exception { BlockDeviceDriver blockDevice = new ByteBlockDevice(new FileBlockDeviceDriver( new URL("https: 2 * 512)); blockDevice.init(); PartitionTableEntry entry = new PartitionTableEntry(PartitionTypes.FAT32, 2 * 512, 1337); FileSystem fs = FileSystemFactory.createFileSystem(entry, blockDevice); assertTrue(fs instanceof Fat32FileSystem); }
public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws IOException, UnsupportedFileSystemException { for(FileSystemCreator creator : fileSystems) { FileSystem fs = creator.read(entry, blockDevice); if(fs != null) { return fs; } } throw new UnsupportedFileSystemException(); }
FileSystemFactory { public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws IOException, UnsupportedFileSystemException { for(FileSystemCreator creator : fileSystems) { FileSystem fs = creator.read(entry, blockDevice); if(fs != null) { return fs; } } throw new UnsupportedFileSystemException(); } }
FileSystemFactory { public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws IOException, UnsupportedFileSystemException { for(FileSystemCreator creator : fileSystems) { FileSystem fs = creator.read(entry, blockDevice); if(fs != null) { return fs; } } throw new UnsupportedFileSystemException(); }  }
FileSystemFactory { public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws IOException, UnsupportedFileSystemException { for(FileSystemCreator creator : fileSystems) { FileSystem fs = creator.read(entry, blockDevice); if(fs != null) { return fs; } } throw new UnsupportedFileSystemException(); }  static FileSystem createFileSystem(PartitionTableEntry entry,
			BlockDeviceDriver blockDevice); static synchronized void registerFileSystem(FileSystemCreator creator); static void setTimeZone(TimeZone zone); static TimeZone getTimeZone(); }
FileSystemFactory { public static FileSystem createFileSystem(PartitionTableEntry entry, BlockDeviceDriver blockDevice) throws IOException, UnsupportedFileSystemException { for(FileSystemCreator creator : fileSystems) { FileSystem fs = creator.read(entry, blockDevice); if(fs != null) { return fs; } } throw new UnsupportedFileSystemException(); }  static FileSystem createFileSystem(PartitionTableEntry entry,
			BlockDeviceDriver blockDevice); static synchronized void registerFileSystem(FileSystemCreator creator); static void setTimeZone(TimeZone zone); static TimeZone getTimeZone();  }