当前位置: 首页>>代码示例>>Java>>正文


Java RelativeDirectory.basename方法代码示例

本文整理汇总了Java中com.sun.tools.javac.file.RelativePath.RelativeDirectory.basename方法的典型用法代码示例。如果您正苦于以下问题:Java RelativeDirectory.basename方法的具体用法?Java RelativeDirectory.basename怎么用?Java RelativeDirectory.basename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.tools.javac.file.RelativePath.RelativeDirectory的用法示例。


在下文中一共展示了RelativeDirectory.basename方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildIndex

import com.sun.tools.javac.file.RelativePath.RelativeDirectory; //导入方法依赖的package包/类
private void buildIndex() throws IOException {
    int entryCount = get2ByteLittleEndian(zipDir, 0);

    // Add each of the files
    if (entryCount > 0) {
        directories = new LinkedHashMap<RelativeDirectory, DirectoryEntry>();
        ArrayList<Entry> entryList = new ArrayList<Entry>();
        int pos = 2;
        for (int i = 0; i < entryCount; i++) {
            pos = readEntry(pos, entryList, directories);
        }

        // Add the accumulated dirs into the same list
        for (RelativeDirectory d: directories.keySet()) {
            // use shared RelativeDirectory objects for parent dirs
            RelativeDirectory parent = getRelativeDirectory(d.dirname().getPath());
            String file = d.basename();
            Entry zipFileIndexEntry = new Entry(parent, file);
            zipFileIndexEntry.isDir = true;
            entryList.add(zipFileIndexEntry);
        }

        entries = entryList.toArray(new Entry[entryList.size()]);
        Arrays.sort(entries);
    } else {
        cleanupState();
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:29,代码来源:ZipFileIndex.java

示例2: buildIndex

import com.sun.tools.javac.file.RelativePath.RelativeDirectory; //导入方法依赖的package包/类
private void buildIndex() throws IOException {
    int len = zipDir.length;

    // Add each of the files
    if (len > 0) {
        directories = new LinkedHashMap<RelativeDirectory, DirectoryEntry>();
        ArrayList<Entry> entryList = new ArrayList<Entry>();
        for (int pos = 0; pos < len; ) {
            pos = readEntry(pos, entryList, directories);
        }

        // Add the accumulated dirs into the same list
        for (RelativeDirectory d: directories.keySet()) {
            // use shared RelativeDirectory objects for parent dirs
            RelativeDirectory parent = getRelativeDirectory(d.dirname().getPath());
            String file = d.basename();
            Entry zipFileIndexEntry = new Entry(parent, file);
            zipFileIndexEntry.isDir = true;
            entryList.add(zipFileIndexEntry);
        }

        entries = entryList.toArray(new Entry[entryList.size()]);
        Arrays.sort(entries);
    } else {
        cleanupState();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ZipFileIndex.java

示例3: buildIndex

import com.sun.tools.javac.file.RelativePath.RelativeDirectory; //导入方法依赖的package包/类
private void buildIndex() throws IOException {
    int entryCount = get2ByteLittleEndian(zipDir, 0);

    // Add each of the files
    if (entryCount > 0) {
        directories = new HashMap<RelativeDirectory, DirectoryEntry>();
        ArrayList<Entry> entryList = new ArrayList<Entry>();
        int pos = 2;
        for (int i = 0; i < entryCount; i++) {
            pos = readEntry(pos, entryList, directories);
        }

        // Add the accumulated dirs into the same list
        for (RelativeDirectory d: directories.keySet()) {
            // use shared RelativeDirectory objects for parent dirs
            RelativeDirectory parent = getRelativeDirectory(d.dirname().getPath());
            String file = d.basename();
            Entry zipFileIndexEntry = new Entry(parent, file);
            zipFileIndexEntry.isDir = true;
            entryList.add(zipFileIndexEntry);
        }

        entries = entryList.toArray(new Entry[entryList.size()]);
        Arrays.sort(entries);
    } else {
        cleanupState();
    }
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:29,代码来源:ZipFileIndex.java


注:本文中的com.sun.tools.javac.file.RelativePath.RelativeDirectory.basename方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。