Java Code Examples for com.sun.tools.javac.file.RelativePath.RelativeDirectory#basename()
The following examples show how to use
com.sun.tools.javac.file.RelativePath.RelativeDirectory#basename() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZipFileIndex.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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(); } }
Example 2
Source File: ZipFileIndex.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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(); } }
Example 3
Source File: ZipFileIndex.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
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(); } }
Example 4
Source File: ZipFileIndex.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
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(); } }
Example 5
Source File: ZipFileIndex.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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(); } }
Example 6
Source File: ZipFileIndex.java From javaide with GNU General Public License v3.0 | 5 votes |
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(); } }
Example 7
Source File: ZipFileIndex.java From hottub with GNU General Public License v2.0 | 5 votes |
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(); } }
Example 8
Source File: ZipFileIndex.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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(); } }
Example 9
Source File: ZipFileIndex.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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(); } }