Package org.sd_network.vfs.sector

Examples of org.sd_network.vfs.sector.SectorDriver


    {
        super(sessionID, vfsFile, FileSession.Mode.WRITE);
        _fileSize = 0;
        vfsFile.resizeTo(_fileSize);
        try {
            SectorDriver driver = SectorDriverManager.getSectorDriver();
            driver.deleteSectors(vfsFile.getID());
            _oStream = driver.getOutputStream(vfsFile.getID());
        } catch (SectorException e) {
            throw new VfsIOException(e);
        }
    }
View Full Code Here


    {
        checkClosed();

        try {
            _oStream.close();
            SectorDriver driver = SectorDriverManager.getSectorDriver();
            _vfsFile.resizeTo(driver.getFileSize(_vfsFile.getID()));
            _closed = true;
        } catch (IOException e) {
            throw new VfsIOException(e);
        } catch (SectorException e) {
            throw new VfsIOException(e);
View Full Code Here

            return;

        _log.log(Level.WARNING, "Called destroy() without call close()");
        try {
            _oStream.close();
            SectorDriver driver = SectorDriverManager.getSectorDriver();
            driver.deleteSectors(_vfsFile.getID());
            _vfsFile.resizeTo(0);
            _closed = true;
        } catch (IOException e) {
            throw new VfsIOException(e);
        } catch (SectorException e) {
View Full Code Here

        if (childList.size() > 0)
            throw new VfsIOException("The object has child object.");

        // delete sectors related to specified fileID.
        try {
            SectorDriver sectorDriver = SectorDriverManager.getSectorDriver();
            sectorDriver.deleteSectors(fileID);
        } catch (SectorException e) {
            throw new VfsIOException(e.getMessage(), e);
        }

        // delete file entry.
View Full Code Here

        }

        long availableBytes = 0;
        long usedBytes = 0;
        try {
            SectorDriver sectorDriver = SectorDriverManager.getSectorDriver();
            availableBytes = sectorDriver.getAvailableBytes();
            usedBytes = sectorDriver.getUsedBytes();
        } catch (SectorException e) {
            throw new VfsIOException(e.getMessage(), e);
        }
        return new SystemInfo(bytesPerRead, bytesPerWrite,
            childObjectsPerParent, hierarchicalDepth, fileNameLength,
View Full Code Here

    ReadFileSession(String sessionID, VfsFile vfsFile)
        throws VfsIOException
    {
        super(sessionID, vfsFile, FileSession.Mode.READ);
        try {
            SectorDriver driver = SectorDriverManager.getSectorDriver();
            _iStream = driver.getInputStream(vfsFile.getID());
        } catch (SectorException e) {
            throw new VfsIOException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.sd_network.vfs.sector.SectorDriver

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.