Package org.jnode.fs.ntfs

Examples of org.jnode.fs.ntfs.FileRecord


     * @return
     * @throws IOException
     */
    public IndexBlock getIndexBlock(IndexRoot indexRoot, long vcn) throws IOException {
        log.debug("getIndexBlock(..," + vcn + ")");
        final FileRecord fileRecord = getFileRecord();

        // VCN passed in is relative to the size of index clusters, not filesystem clusters.
        // Calculate the actual offset we need in terms of filesystem clusters,
        // and how many actual clusters we will need to read.

        final int indexBlockSize = indexRoot.getIndexBlockSize();
        final int indexClusterSize = indexBlockSize / indexRoot.getClustersPerIndexBlock();
        final int fsClusterSize = fileRecord.getVolume().getClusterSize();
        final long fsVcn = vcn * indexClusterSize / fsClusterSize;
        final int fsNrClusters = (indexBlockSize - 1) / fsClusterSize + 1;
        final int offsetIntoVcn = (int) ((vcn * indexClusterSize) % fsClusterSize);

        final byte[] data = new byte[fsNrClusters * fsClusterSize];
 
View Full Code Here

TOP

Related Classes of org.jnode.fs.ntfs.FileRecord

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.