Home
last modified time | relevance | path

Searched refs:entry (Results 1 – 25 of 152) sorted by relevance

1234567

/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DZFile.java545 StoredEntry entry = mapEntry.getStore(); in entries() local
546 assert entry != null; in entries()
547 entries.put(entry.getCentralDirectoryHeader().getName(), entry); in entries() local
612 for (StoredEntry entry : directory.getEntries().values()) { in readData()
613 long start = entry.getCentralDirectoryHeader().getOffset(); in readData()
614 long end = start + entry.getInFileSize(); in readData()
669 + describe.apply(entry) in readData()
674 FileUseMapEntry<StoredEntry> mapEntry = map.add(start, end, entry); in readData()
675 entries.put(entry.getCentralDirectoryHeader().getName(), mapEntry); in readData()
949 void delete(@Nonnull final StoredEntry entry, boolean notify) throws IOException { in delete() argument
[all …]
DFileUseMap.java102 private void internalAdd(@Nonnull FileUseMapEntry<?> entry) { in internalAdd() argument
103 map.add(entry); in internalAdd()
105 if (entry.isFree()) { in internalAdd()
106 free.add(entry); in internalAdd()
115 private void internalRemove(@Nonnull FileUseMapEntry<?> entry) { in internalRemove() argument
116 boolean wasRemoved = map.remove(entry); in internalRemove()
119 if (entry.isFree()) { in internalRemove()
120 free.remove(entry); in internalRemove()
131 private void add(@Nonnull FileUseMapEntry<?> entry) { in add() argument
132 Preconditions.checkArgument(entry.getStart() < size, "entry.getStart() >= size"); in add()
[all …]
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/
DFatLfnDirectory.java93 FatFile getFile(FatDirectoryEntry entry) throws IOException { in getFile() argument
94 FatFile file = entryToFile.get(entry); in getFile()
97 file = FatFile.get(fat, entry); in getFile()
98 entryToFile.put(entry, file); in getFile()
104 FatLfnDirectory getDirectory(FatDirectoryEntry entry) throws IOException { in getDirectory() argument
105 FatLfnDirectory result = entryToDirectory.get(entry); in getDirectory()
108 final ClusterChainDirectory storage = read(entry, fat); in getDirectory()
110 entryToDirectory.put(entry, result); in getDirectory()
136 final FatLfnDirectoryEntry entry = in addFile() local
139 dir.addEntries(entry.compactForm()); in addFile()
[all …]
DFatType.java51 void writeEntry(byte[] data, int index, long entry) { in writeEntry() argument
55 data[idx] = (byte) (entry & 0xFF); in writeEntry()
56 data[idx + 1] = (byte) ((entry >> 8) & 0x0F); in writeEntry()
58 data[idx] |= (byte) ((entry & 0x0F) << 4); in writeEntry()
59 data[idx + 1] = (byte) ((entry >> 4) & 0xFF); in writeEntry()
78 void writeEntry(byte[] data, int index, long entry) { in writeEntry() argument
80 data[idx] = (byte) (entry & 0xFF); in writeEntry()
81 data[idx + 1] = (byte) ((entry >> 8) & 0xFF); in writeEntry()
101 void writeEntry(byte[] data, int index, long entry) { in writeEntry() argument
103 data[idx] = (byte) (entry & 0xFF); in writeEntry()
[all …]
DFatFile.java36 private final FatDirectoryEntry entry; field in FatFile
42 this.entry = myEntry; in FatFile()
46 static FatFile get(Fat fat, FatDirectoryEntry entry) in get() argument
49 if (entry.isDirectory()) in get()
50 throw new IllegalArgumentException(entry + " is a directory"); in get()
53 fat, entry.getStartCluster(), entry.isReadonlyFlag()); in get()
55 if (entry.getLength() > cc.getLengthOnDisk()) throw new IOException( in get()
58 return new FatFile(entry, cc); in get()
71 return entry.getLength(); in getLength()
93 this.entry.setStartCluster(chain.getStartCluster()); in setLength()
[all …]
DAbstractDirectory.java218 final FatDirectoryEntry entry = entries.get(i); in flush() local
220 if (entry != null) { in flush()
221 entry.write(data); in flush()
288 public void removeEntry(FatDirectoryEntry entry) throws IOException { in removeEntry() argument
289 assert (entry != null); in removeEntry()
291 this.entries.remove(entry); in removeEntry()
313 final FatDirectoryEntry entry = FatDirectoryEntry.create(true); in createSub() local
314 entry.setStartCluster(chain.getStartCluster()); in createSub()
324 copyDateTimeFields(entry, dot); in createSub()
332 copyDateTimeFields(entry, dotDot); in createSub()
[all …]
DFat.java262 long entry = entries[(int) cluster]; in getNextCluster() local
263 if (isEofCluster(entry)) { in getNextCluster()
266 return entry; in getNextCluster()
425 protected boolean isFreeCluster(long entry) { in isFreeCluster() argument
426 if (entry > Integer.MAX_VALUE) throw new IllegalArgumentException(); in isFreeCluster()
427 return (entries[(int) entry] == 0); in isFreeCluster()
436 protected boolean isReservedCluster(long entry) { in isReservedCluster() argument
437 return fatType.isReservedCluster(entry); in isReservedCluster()
446 protected boolean isEofCluster(long entry) { in isEofCluster() argument
447 return fatType.isEofCluster(entry); in isEofCluster()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
DRebootReasonCollectorTest.java122 entry -> in testAddingMetrics_singleDevice()
123 entry.getKey().contains(RebootReasonCollector.METRIC_PREFIX) in testAddingMetrics_singleDevice()
124 && entry.getKey().contains("bootloader_reason") in testAddingMetrics_singleDevice()
125 && entry.getKey().contains("system_reason_1") in testAddingMetrics_singleDevice()
126 && !entry.getKey().contains(DEVICE_SERIAL_1) in testAddingMetrics_singleDevice()
128 entry.getValue() in testAddingMetrics_singleDevice()
137 entry -> in testAddingMetrics_singleDevice()
138 entry.getKey().contains(RebootReasonCollector.METRIC_PREFIX) in testAddingMetrics_singleDevice()
139 && entry.getKey().contains("bootloader_reason") in testAddingMetrics_singleDevice()
140 && entry.getKey().contains("system_reason_2") in testAddingMetrics_singleDevice()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/postprocessor/
DPerfettoGenericPostProcessor.java344 for (Entry<FieldDescriptor, Object> entry : fields.entrySet()) { in convertPerfettoProtoMessage()
345 if (!(entry.getValue() instanceof Message) && !(entry.getValue() instanceof List)) { in convertPerfettoProtoMessage()
346 if (isNumeric(entry.getValue().toString())) { in convertPerfettoProtoMessage()
348 if (mNumberPattern.matcher(entry.getValue().toString()).matches()) { in convertPerfettoProtoMessage()
350 entry.getKey().getName(), in convertPerfettoProtoMessage()
351 TfMetricProtoUtil.stringToMetric(entry.getValue().toString()) in convertPerfettoProtoMessage()
356 entry.getKey().getName(), in convertPerfettoProtoMessage()
359 Double.valueOf(entry.getValue().toString()) in convertPerfettoProtoMessage()
368 entry.getKey().getName().toString(), in convertPerfettoProtoMessage()
369 entry.getValue().toString())); in convertPerfettoProtoMessage()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/multi/
DMixImageZipPreparer.java343 final ZipEntry entry = entries.nextElement(); in getInputStreamFactoriesFromImageZip() local
344 if (entry.isDirectory()) { in getInputStreamFactoriesFromImageZip()
345 CLog.w("Image zip contains subdirectory %s.", entry.getName()); in getInputStreamFactoriesFromImageZip()
349 String name = new File(entry.getName()).getName(); in getInputStreamFactoriesFromImageZip()
354 if (entry.getSize() < 0) { in getInputStreamFactoriesFromImageZip()
357 if (entry.getCrc() < 0) { in getInputStreamFactoriesFromImageZip()
366 return zipFile.getInputStream(entry); in getInputStreamFactoriesFromImageZip()
371 return entry.getSize(); in getInputStreamFactoriesFromImageZip()
376 return entry.getCrc(); in getInputStreamFactoriesFromImageZip()
433 private static void initStoredZipEntry(ZipEntry entry, InputStreamFactory factory) in initStoredZipEntry() argument
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/
DSigningExtension.java163 @Nonnull StoredEntry entry, @Nullable StoredEntry replaced) { in register()
164 return () -> onZipEntryOutput(entry); in register()
168 public IOExceptionRunnable removed(@Nonnull StoredEntry entry) { in register()
169 String entryName = entry.getCentralDirectoryHeader().getName(); in register()
244 private void onZipEntryOutput(@Nonnull StoredEntry entry) throws IOException { in onZipEntryOutput() argument
246 String entryName = entry.getCentralDirectoryHeader().getName(); in onZipEntryOutput()
249 if (entry.isDeleted()) { in onZipEntryOutput()
256 byte[] entryContents = entry.read(); in onZipEntryOutput()
277 for (StoredEntry entry : zFile.entries()) { in onOutputZipReadyForUpdate()
278 String entryName = entry.getCentralDirectoryHeader().getName(); in onOutputZipReadyForUpdate()
[all …]
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DZipUtil2.java44 private static boolean applyUnixModeIfNecessary(ZipArchiveEntry entry, File localFile) in applyUnixModeIfNecessary() argument
46 if (entry.getPlatform() == ZipArchiveEntry.PLATFORM_UNIX) { in applyUnixModeIfNecessary()
48 FileUtil.unixModeToPosix(entry.getUnixMode())); in applyUnixModeIfNecessary()
65 ZipArchiveEntry entry = entries.nextElement(); in extractZip() local
66 File childFile = new File(destDir, entry.getName()); in extractZip()
68 if (entry.isDirectory()) { in extractZip()
70 if (!applyUnixModeIfNecessary(entry, childFile)) { in extractZip()
71 noPermissions.add(entry.getName()); in extractZip()
75 FileUtil.writeToFile(zipFile.getInputStream(entry), childFile); in extractZip()
76 if (!applyUnixModeIfNecessary(entry, childFile)) { in extractZip()
[all …]
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/reporter/
DGameQualificationResultReporter.java160 for (Map.Entry<TestDescription, MetricSummary> entry : summaries.entrySet()) { in getInvocationSummary()
161 sb.append(String.format("\n%s Metrics:\n%s\n", entry.getKey(), entry.getValue())); in getInvocationSummary()
179 for (Map.Entry<TestDescription, TestResult> entry in getInvocationSummary()
186 sb.append(entry.getKey().toString()); in getInvocationSummary()
188 sb.append(entry.getValue().getStatus().name()); in getInvocationSummary()
276 for (Map.Entry<TestDescription, TestResult> entry : testResults.entrySet()) { in getTestRunSummary()
277 if (mSuppressPassedTest && TestStatus.PASSED.equals(entry.getValue().getStatus())) { in getTestRunSummary()
280 sb.append(getTestSummary(entry.getKey(), entry.getValue())); in getTestRunSummary()
304 for (Map.Entry<TestDescription, MetricSummary> entry : summaries.entrySet()) { in createPerformanceReport()
305 TestDescription testId = entry.getKey(); in createPerformanceReport()
[all …]
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/
DZFileTest.java219 ZipEntry entry = new ZipEntry("foo/");
220 entry.setMethod(ZipEntry.STORED);
221 entry.setSize(0);
222 entry.setCompressedSize(0);
223 entry.setCrc(0);
224 zos.putNextEntry(entry);
948 StoredEntry entry = f.entries().iterator().next(); in utf8NamesSupportedOnReading() local
954 entry.getCentralDirectoryHeader().getName()); in utf8NamesSupportedOnReading()
956 "Stuff about food is good.\n".getBytes(Charsets.US_ASCII), entry.read()); in utf8NamesSupportedOnReading()
973 StoredEntry entry = f.entries().iterator().next(); in utf8NamesSupportedOnReadingWithoutUtf8Flag() local
[all …]
DAlignmentTest.java185 StoredEntry entry = zf.get("test.txt");
186 assertNotNull(entry);
187 assertFalse(entry.realign());
268 StoredEntry entry = zf.get("foo");
269 assertNotNull(entry);
270 assertEquals(0, entry.getCentralDirectoryHeader().getOffset());
296 StoredEntry entry = zf.get("foo");
297 assertNotNull(entry);
298 assertEquals(991, entry.getCentralDirectoryHeader().getOffset());
358 StoredEntry entry = zf.get("foo.a");
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/ddmlib/
DInstrumentationResultProtoParser.java127 for (ResultsBundleEntry entry : results.getEntriesList()) { in processTestStatus()
128 String currentKey = entry.getKey(); in processTestStatus()
130 if (entry.hasValueString()) { in processTestStatus()
131 currentValue = entry.getValueString().trim(); in processTestStatus()
132 } else if (entry.hasValueInt()) { in processTestStatus()
133 currentValue = String.valueOf(entry.getValueInt()); in processTestStatus()
155 for (ResultsBundleEntry entry : results.getEntriesList()) { in processSessionStatus()
156 String currentKey = entry.getKey(); in processSessionStatus()
158 if (entry.hasValueString()) { in processSessionStatus()
159 currentValue = entry.getValueString(); in processSessionStatus()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/apilevels/
DApiClass.java70 ApiElement entry = findByName(mSuperClasses, superClass); in removeSuperClass() local
71 if (entry != null) { in removeSuperClass()
72 mSuperClasses.remove(entry); in removeSuperClass()
74 return entry; in removeSuperClass()
212 Map.Entry<String, ApiElement> entry = it.next(); in removeOverridingMethods() local
213 ApiElement method = entry.getValue(); in removeOverridingMethods()
275 for (Map.Entry<String, ApiElement> entry : hiddenSuper.mMethods.entrySet()) { in inlineFromHiddenSuperClasses()
276 String name = entry.getKey(); in inlineFromHiddenSuperClasses()
277 ApiElement value = entry.getValue(); in inlineFromHiddenSuperClasses()
282 for (Map.Entry<String, ApiElement> entry : hiddenSuper.mFields.entrySet()) { in inlineFromHiddenSuperClasses()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/postprocessor/
DStatsdGenericPostProcessor.java176 for (Entry<FieldDescriptor, Object> entry : fields.entrySet()) { in convertProtoMessage()
177 if (FIELDS_TO_SKIP.contains(entry.getKey().getName())) { in convertProtoMessage()
180 if (entry.getValue() instanceof Message) { in convertProtoMessage()
182 convertProtoMessage((Message) entry.getValue()); in convertProtoMessage()
185 String.join(METRIC_SEP, entry.getKey().getName(), metricEntry.getKey()), in convertProtoMessage()
188 } else if (entry.getValue() instanceof List) { in convertProtoMessage()
189 List<? extends Object> listMetrics = (List) entry.getValue(); in convertProtoMessage()
193 ? entry.getKey().getName() in convertProtoMessage()
196 entry.getKey().getName(), in convertProtoMessage()
216 entry.getKey().getName(), in convertProtoMessage()
[all …]
/tools/tradefederation/core/common_util/com/android/tradefed/util/zip/
DMergedZipEntryCollection.java81 for (CentralDirectoryInfo entry : entries) { in createCollections()
83 long newGap = entry.getLocalHeaderOffset() - endOffset + totalGap; in createCollections()
85 entry.getLocalHeaderOffset() in createCollections()
87 + entry.getCompressedSize() in createCollections()
90 if (endOffset < entry.getLocalHeaderOffset() - MAX_GAP in createCollections()
97 group.add(entry); in createCollections()
98 if (group.size() > 1 && entry.getLocalHeaderOffset() > endOffset) { in createCollections()
99 totalGap += entry.getLocalHeaderOffset() - endOffset; in createCollections()
101 endOffset = entry.getLocalHeaderOffset() + HEADER_SIZE + entry.getCompressedSize(); in createCollections()
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
DFilePullerDeviceMetricCollector.java128 for (Map.Entry<String, File> entry : pulledMetrics.entrySet()) { in processMetricRequest()
129 processMetricFile(entry.getKey(), entry.getValue(), data); in processMetricRequest()
147 for (Entry<String, String> entry : currentMetrics.entrySet()) { in pullMetricFile()
148 if (p.matcher(entry.getKey()).find()) { in pullMetricFile()
155 File attemptPull = retrieveFile(device, entry.getValue()); in pullMetricFile()
158 device.deleteFile(entry.getValue()); in pullMetricFile()
162 matchedFiles.put(entry.getKey(), attemptPull); in pullMetricFile()
167 entry.getValue(), device.getSerialNumber()); in pullMetricFile()
/tools/metalava/src/main/java/com/android/tools/metalava/
DRewriteAnnotations.kt221 val entry = zis.nextEntry ?: break in <lambda>() constant
222 val name = entry.name in <lambda>()
226 newEntry = if (entry.method == JarEntry.STORED) { in <lambda>()
227 val jarEntry = JarEntry(entry) in <lambda>()
228 jarEntry.size = entry.size in <lambda>()
229 jarEntry.compressedSize = entry.compressedSize in <lambda>()
230 jarEntry.crc = entry.crc in <lambda>()
239 newEntry.lastModifiedTime = entry.lastModifiedTime in <lambda>()
248 !entry.isDirectory in <lambda>()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DZipUtilFuncTest.java100 for (CentralDirectoryInfo entry : zipEntries) { in testCentralDirectoryInfos()
101 Assert.assertFalse(validateCentralDirectoryInfo(entry)); in testCentralDirectoryInfos()
164 private boolean validateCentralDirectoryInfo(CentralDirectoryInfo entry) { in validateCentralDirectoryInfo() argument
165 return (Long.toHexString(entry.getCompressedSize()).equals(OVERFLOW) || in validateCentralDirectoryInfo()
166 Long.toHexString(entry.getUncompressedSize()).equals(OVERFLOW) || in validateCentralDirectoryInfo()
167 Long.toHexString(entry.getLocalHeaderOffset()).equals(OVERFLOW)); in validateCentralDirectoryInfo()
173 for (CentralDirectoryInfo entry : zipEntries) { in validateCentralDirectoryInfos()
178 if (zipEntry.getName().equals(entry.getFileName())) { in validateCentralDirectoryInfos()
/tools/tradefederation/core/src/com/android/tradefed/device/
DNativeDevice.java1499 public IFileEntry getFileEntry(FileEntry entry) throws DeviceNotAvailableException { in getFileEntry() argument
1501 return new FileEntryWrapper(this, entry); in getFileEntry()
1635 IFileEntry entry = getFileEntry(entryRoot); in pullDir() local
1636 Collection<IFileEntry> children = entry.getChildren(false); in pullDir()
1715 IFileEntry entry = remoteFileEntry.findChild(localFile.getName()); in syncFiles() local
1716 if (entry == null) { in syncFiles()
1722 if (!syncFiles(localFile, entry)) { in syncFiles()
1725 } else if (isNewer(localFile, entry)) { in syncFiles()
1833 protected boolean isNewer(File localFile, IFileEntry entry) { in isNewer() argument
1834 final String entryTimeString = String.format("%s %s", entry.getDate(), entry.getTime()); in isNewer()
[all …]
/tools/tradefederation/core/global_configuration/com/android/tradefed/host/
DLocalHostResourceManager.java47 for (Map.Entry<String, String> entry : mHostResources.entrySet()) { in setup()
48 File localFile = fetchHostResource(entry.getKey(), entry.getValue()); in setup()
49 mDownloadedHostResources.put(entry.getKey(), localFile); in setup()
65 for (Map.Entry<String, File> entry : mDownloadedHostResources.entrySet()) { in cleanup()
66 clearHostResource(entry.getKey(), entry.getValue()); in cleanup()
/tools/tradefederation/contrib/src/com/android/performance/tests/
DEmmcPerformanceTest.java242 for (Map.Entry<String, SimpleStats> entry : simpleperfMetricsMap.entrySet()) { in runTest()
244 String.format("%s_%s", testKey, entry.getKey()), in runTest()
245 Double.toString(entry.getValue().median())); in runTest()
326 for (Map.Entry<String, String> entry : spResult.getBenchmarkMetrics().entrySet()) { in simpleperfResultAggregation()
330 .parse(entry.getValue()) in simpleperfResultAggregation()
332 if (!simpleperfMetricsMap.containsKey(entry.getKey())) { in simpleperfResultAggregation()
334 simpleperfMetricsMap.put(entry.getKey(), newStat); in simpleperfResultAggregation()
336 simpleperfMetricsMap.get(entry.getKey()).add(metricValue); in simpleperfResultAggregation()

1234567