Package org.jnode.driver.block

Examples of org.jnode.driver.block.MappedBlockDeviceSupport


    public void init(TestConfig config, MockObjectTestCase testCase) throws Exception {
        super.init(config, testCase);

        Device parent = MockObjectFactory.createParentDevice();
        BlockDeviceAPITestConfig cfg = (BlockDeviceAPITestConfig) config;
        MappedBlockDeviceSupport api = new MappedBlockDeviceSupport(parent, 0L, cfg.getDeviceSize());
        init(null, api, null);
    }
View Full Code Here


            final IDEDiskPartitionDevice dev = this.device;
            this.pte = dev.getPartitionTableEntry();
            final Device parent = dev.getParent();
            final long offset = dev.getStartSector() * SECTOR_SIZE;
            final long length = dev.getSectors() * SECTOR_SIZE;
            this.mapping = new MappedBlockDeviceSupport(parent, offset, length);
            /* Register the FSBlockDevice API */
            device.registerAPI(FSBlockDeviceAPI.class, this);
        } catch (IOException ex) {
            throw new DriverException("Error in MappedBlockDeviceSupport", ex);
        }
View Full Code Here

        // Calculate the offset and length of the embedded HFS+ file system
        long offset = mdb.getAllocationBlockStart() * 512 +
            mdb.getEmbeddedVolumeStartBlock() * mdb.getAllocationBlockSize();
        long length = mdb.getEmbeddedVolumeBlockCount() * mdb.getAllocationBlockSize();

        MappedBlockDeviceSupport subDevice;
        try {
            // Take a sub-section of the device to pass down to the HFS+ code
            subDevice = new MappedBlockDeviceSupport(device, offset, length);
        } catch (IOException e) {
            throw new FileSystemException("Error creating sub-device for HFS+", e);
        }

        HfsPlusFileSystem fs = new HfsPlusFileSystem(subDevice, readOnly, this);
View Full Code Here

TOP

Related Classes of org.jnode.driver.block.MappedBlockDeviceSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.