/libcore/ojluni/src/main/java/java/io/ |
H A D | ExpiringCache.java | 79 Entry entry = entryFor(key); 80 if (entry != null) { 81 return entry.val(); 90 Entry entry = entryFor(key); 91 if (entry != null) { 92 entry.setTimestamp(System.currentTimeMillis()); 93 entry.setVal(val); 104 Entry entry = map.get(key); 105 if (entry != null) { 106 long delta = System.currentTimeMillis() - entry [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | MergeCollation.java | 45 * Patterns are strings of the form <entry>*, where <entry> has the 47 * <pattern> := <entry>* 48 * <entry> := <separator><chars>{"/"<extension>} 94 PatternEntry entry = patterns.get(i); 95 if (entry.extension.length() != 0) { 98 extList.add(entry); 108 entry.addToBuffer(result, false, withWhiteSpace, null); 124 PatternEntry entry = patterns.get(i); 125 if (entry 302 findLastEntry(PatternEntry entry, StringBuffer excessChars) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | SimpleEntryTest.java | 71 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); 72 assertEquals(1, entry.getKey()); 73 entry = new AbstractMap.SimpleEntry(null, null); 74 assertNull(entry.getKey()); 78 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); 79 assertEquals("test", entry.getValue()); 80 entry = new AbstractMap.SimpleEntry(null, null); 81 assertNull(entry.getValue()); 85 Entry entry = new AbstractMap.SimpleEntry<Integer, String>(1, "test"); 86 assertEquals("test", entry [all...] |
H A D | SimpleImmutableEntryTest.java | 72 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); 73 assertEquals(1, entry.getKey()); 74 entry = new AbstractMap.SimpleImmutableEntry(null, null); 75 assertNull(entry.getKey()); 79 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); 80 assertEquals("test", entry.getValue()); 81 entry = new AbstractMap.SimpleImmutableEntry(null, null); 82 assertNull(entry.getValue()); 86 Entry entry = new AbstractMap.SimpleImmutableEntry<Integer, String>(1, "test"); 87 assertEquals("test", entry [all...] |
/libcore/ojluni/src/main/java/sun/util/locale/ |
H A D | LocaleObjectCache.java | 55 CacheEntry<K, V> entry = map.get(key); 56 if (entry != null) { 57 value = entry.get(); 69 entry = map.putIfAbsent(key, newEntry); 70 if (entry == null) { 73 value = entry.get(); 84 CacheEntry<K, V> entry = new CacheEntry<>(key, value, queue); 85 CacheEntry<K, V> oldEntry = map.put(key, entry); 91 CacheEntry<K, V> entry; 92 while ((entry [all...] |
/libcore/ojluni/src/main/java/sun/nio/fs/ |
H A D | LinuxFileStore.java | 47 LinuxFileStore(UnixFileSystem fs, UnixMountEntry entry) throws IOException { argument 48 super(fs, entry); 52 * Finds, and returns, the mount entry for the file system where the file 86 for (UnixMountEntry entry: fs.getMountEntries("/proc/mounts")) { 87 if (Arrays.equals(dir, entry.dir())) 88 return entry; 133 if ((entry().hasOption("user_xattr"))) 138 if (entry().fstype().equals("ext3") || entry().fstype().equals("ext4")) 143 UnixPath dir = new UnixPath(file().getFileSystem(), entry() [all...] |
H A D | LinuxFileSystem.java | 84 UnixMountEntry entry = new UnixMountEntry(); 85 int res = getmntent(fp, entry); 88 entries.add(entry); 113 FileStore getFileStore(UnixMountEntry entry) throws IOException { argument 114 return new LinuxFileStore(this, entry);
|
H A D | UnixFileStore.java | 49 // entry in the mount tab 50 private final UnixMountEntry entry; field in class:UnixFileStore 65 this.entry = findMountEntry(); 68 UnixFileStore(UnixFileSystem fs, UnixMountEntry entry) throws IOException { argument 69 this.file = new UnixPath(fs, entry.dir()); 70 this.dev = (entry.dev() == 0L) ? devFor(this.file) : entry.dev(); 71 this.entry = entry; 75 * Find the mount entry fo 87 UnixMountEntry entry() { method in class:UnixFileStore [all...] |
H A D | PollingWatchService.java | 181 for (Map.Entry<Object,PollingWatchKey> entry: map.entrySet()) { 182 PollingWatchKey watchKey = entry.getValue(); 257 for (Path entry: stream) { 260 Files.getLastModifiedTime(entry, LinkOption.NOFOLLOW_LINKS).toMillis(); 261 entries.put(entry.getFileName(), new CacheEntry(lastModified, tickCount)); 336 for (Path entry: stream) { 340 Files.getLastModifiedTime(entry, LinkOption.NOFOLLOW_LINKS).toMillis(); 342 // unable to get attributes of entry. If file has just 349 CacheEntry e = entries.get(entry.getFileName()); 352 entries.put(entry [all...] |
/libcore/tzdata/shared2/src/main/libcore/tzdata/shared2/ |
H A D | TimeZoneDistro.java | 53 * Maximum size of entry getEntryContents() will pull into a byte array. To avoid exhausting 72 throw new DistroException("Distro version file entry not found"); 79 ZipEntry entry; 80 while ((entry = zipInputStream.getNextEntry()) != null) { 81 String name = entry.getName(); 87 if (entry.getSize() > MAX_GET_ENTRY_CONTENTS_SIZE) { 88 throw new IOException("Entry " + entryName + " too large: " + entry.getSize()); 117 ZipEntry entry; 118 while ((entry = zipInputStream.getNextEntry()) != null) { 119 // Validate the entry nam [all...] |
/libcore/ojluni/src/main/java/java/security/acl/ |
H A D | Acl.java | 37 * entries. Each ACL entry, of interface type AclEntry, contains a 40 * group). Additionally, each ACL entry is specified as being either 47 * <ul> <li>Each principal can have at most one positive ACL entry and 48 * one negative entry; that is, multiple positive or negative ACL 49 * entries are not allowed for any principal. Each entry specifies 53 * <li>If there is no entry for a particular principal, then the 56 * <li>If there is a positive entry that grants a principal a 57 * particular permission, and a negative entry that denies the 81 * call the ACL's {@code addEntry} method to add a new ACL entry 119 * Adds an ACL entry t 139 addEntry(Principal caller, AclEntry entry) argument 155 removeEntry(Principal caller, AclEntry entry) argument [all...] |
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
H A D | ReduceByOpTest.java | 54 for (Map.Entry<Boolean, Integer> entry : result.entrySet()) { 55 setContext("entry", entry); 56 Boolean key = entry.getKey(); 57 assertEquals(entry.getValue(), data.stream().filter(e -> pEven.test(e) == key).reduce(0, rPlus)); 64 for (Map.Entry<Integer, Integer> entry : miResult.entrySet()) { 65 setContext("entry", entry); 66 assertEquals((int) entry.getValue(), mgResult.get(entry [all...] |
/libcore/luni/src/main/java/java/net/ |
H A D | AddressCache.java | 72 // Either an InetAddress[] for a positive entry, 73 // or a String detail message for a negative entry. 103 AddressCacheEntry entry = cache.get(new AddressCacheKey(hostname, netId)); 104 // Do we have a valid cache entry? 105 if (entry != null && entry.expiryNanos >= System.nanoTime()) { 106 return entry.value; 123 * negative cache entry.)
|
/libcore/ojluni/src/main/java/java/nio/file/ |
H A D | DirectoryStream.java | 58 * for (Path entry: stream) { 102 * for (Path entry: stream) { 103 * result.add(entry); 123 * entry should be accepted or filtered. A {@code Filter} is passed as the 128 * @param <T> the type of the directory entry 135 * Decides if the given directory entry should be accepted or filtered. 137 * @param entry 138 * the directory entry to be tested 140 * @return {@code true} if the directory entry should be accepted 145 boolean accept(T entry) throw argument [all...] |
H A D | FileTreeWalker.java | 119 * An entry in a directory 272 private Event visit(Path entry, boolean ignoreSecurityException, boolean canUseCached) { argument 276 attrs = getAttributes(entry, canUseCached); 278 return new Event(EventType.ENTRY, entry, ioe); 288 return new Event(EventType.ENTRY, entry, attrs); 292 if (followLinks && wouldLoop(entry, attrs.fileKey())) { 293 return new Event(EventType.ENTRY, entry, 294 new FileSystemLoopException(entry.toString())); 300 stream = Files.newDirectoryStream(entry); 302 return new Event(EventType.ENTRY, entry, io [all...] |
/libcore/ojluni/src/main/java/java/util/zip/ |
H A D | ZipInputStream.java | 47 private ZipEntry entry; field in class:ZipInputStream 58 // one entry 76 * decode the entry names. 91 * used to decode the ZIP entry name (ignored if the 93 * encoding bit</a> of the ZIP entry's general purpose bit 111 * Reads the next ZIP file entry and positions the stream at the 112 * beginning of the entry data. 113 * @return the next ZIP file entry, or null if there are no more entries 119 if (entry != null) { 124 if ((entry [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | Cache.java | 89 * Add an entry to the cache. 99 * Remove an entry from the cache. 290 CacheEntry<K,V> entry = (CacheEntry<K,V>)queue.poll(); 291 if (entry == null) { 294 K key = entry.getKey(); 296 // key is null, entry has already been removed 300 // check if the entry in the map corresponds to the expired 301 // entry. If not, readd the entry 302 if ((currentEntry != null) && (entry ! [all...] |
/libcore/ojluni/src/main/java/java/util/ |
H A D | Hashtable.java | 56 * increase the time cost to look up an entry (which is reflected in most 434 // Creates the new entry. 469 HashtableEntry<K,V> entry = (HashtableEntry<K,V>)tab[index]; 470 for(; entry != null ; entry = entry.next) { 471 if ((entry.hash == hash) && entry.key.equals(key)) { 472 V old = entry.value; 473 entry 1336 HashtableEntry<?,?> entry; field in class:Hashtable.Enumerator [all...] |
/libcore/benchmarks/src/benchmarks/ |
H A D | BufferedZipFileBenchmark.java | 45 out.putNextEntry(new ZipEntry("entry.data")); 59 ZipEntry entry = zipFile.getEntry("entry.data"); 60 InputStream in = zipFile.getInputStream(entry); 72 ZipEntry entry = zipFile.getEntry("entry.data"); 73 InputStream in = new BufferedInputStream(zipFile.getInputStream(entry));
|
H A D | ZipFileBenchmark.java | 63 for (int entry = 0; entry < entryCount; ++entry) { 64 ZipEntry ze = new ZipEntry(Integer.toHexString(entry));
|
/libcore/luni/src/main/java/libcore/io/ |
H A D | ClassPathURLStreamHandler.java | 57 * entry cannot be found under the exact name presented. 67 throw new RuntimeException("Invalid entry name", e); 74 * Returns true if an entry with the specified name exists and is stored (not compressed), 78 ZipEntry entry = jarFile.getEntry(entryName); 79 return entry != null && entry.getMethod() == ZipEntry.STORED; 93 * Finds an entry with the specified name in the {@code jarFile}. If an exact match isn't found it 98 ZipEntry entry = jarFile.getEntry(entryName); 99 if (entry == null && !entryName.endsWith("/") ) { 100 entry [all...] |
/libcore/ojluni/src/main/java/java/time/format/ |
H A D | DateTimeTextProvider.java | 278 for (Map.Entry<String, Integer> entry : map.entrySet()) { 279 int era = entry.getValue(); 287 list.add(createEntry(entry.getKey(), (long)era)); 291 for (Map.Entry<String, Integer> entry : map.entrySet()) { 292 list.add(createEntry(entry.getKey(), (long)(entry.getValue() + 1))); 296 for (Map.Entry<String, Integer> entry : map.entrySet()) { 297 list.add(createEntry(entry.getKey(), (long)toWeekDay(entry.getValue()))); 301 for (Map.Entry<String, Integer> entry [all...] |
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | ZipInputStreamTest.java | 56 ZipEntry entry = in.getNextEntry(); 57 assertEquals(name, entry.getName()); 65 assertNull(in.getNextEntry()); // There's only one entry in the Zip files we create. 78 ZipEntry entry = in.getNextEntry(); 79 assertNull("An empty zip has no entries", entry); 126 // from the "current" entry. 129 // There shouldn't be any bytes left to read if the entry is fully consumed... 134 // ... or if the entry is fully skipped over. 151 ZipEntry entry = new ZipEntry(name); 152 zippedOut.putNextEntry(entry); [all...] |
/libcore/luni/src/main/java/org/apache/harmony/xml/parsers/ |
H A D | SAXParserImpl.java | 51 for (Map.Entry<String,Boolean> entry : initialFeatures.entrySet()) { 52 reader.setFeature(entry.getKey(), entry.getValue());
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/ |
H A D | MapTest.java | 90 for (final Map.Entry<Integer, String> entry : map.entrySet()) { 91 assertEquals(entry.getValue(), EXPECTED.get(entry.getKey()).toUpperCase());
|