Home
last modified time | relevance | path

Searched refs:stream (Results 1 – 25 of 134) sorted by relevance

123456

/tools/metalava/src/main/java/com/android/tools/metalava/apilevels/
DApiElement.java131 void print(String tag, ApiElement parentElement, String indent, PrintStream stream) { in print() argument
132 print(tag, true, parentElement, indent, stream); in print()
148 PrintStream stream) { in print() argument
149 stream.print(indent); in print()
150 stream.print('<'); in print()
151 stream.print(tag); in print()
152 stream.print(" name=\""); in print()
153 stream.print(encodeAttribute(mName)); in print()
155 stream.print("\" since=\""); in print()
156 stream.print(mSince); in print()
[all …]
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/
DStreamingLineReader.kt33 val stream = this@iterLines in <lambda>() constant
35 var lineStartIndex = stream.startIndex in <lambda>()
40 if (index > stream.endIndex) { in <lambda>()
41 if (!stream.loadIndex(index)) break in <lambda>()
43 val window = stream.windowFor(index) in <lambda>()
50 if (lineStartIndex > stream.endIndex) break in <lambda>()
53 if (foundAt == -1L) foundAt = stream.endIndex + 1 in <lambda>()
58 if (foundAt > 0 && stream[foundAt - 1] == '\r'.toByte()) foundAt -= 1 in <lambda>()
61 if (lineStartIndex >= stream.startIndex && (lineEndIndexInclusive - lineStartIndex) >= 0) { in <lambda>()
62 val window = stream.windowFor(lineStartIndex) in <lambda>()
[all …]
/tools/tradefederation/core/python-lib/tradefed_py/
Dtf_runner.py51 self.stream.write('TEST_RUN_STARTED %s\n' % json.dumps(resp))
61 self.stream.write('TEST_STARTED %s\n' % json.dumps(resp))
71 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp))
82 self.stream.write('TEST_FAILED %s\n' % json.dumps(resp))
84 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp))
95 self.stream.write('TEST_IGNORED %s\n' % json.dumps(resp))
97 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp))
108 self.stream.write('TEST_ASSUMPTION_FAILURE %s\n' % json.dumps(resp))
110 self.stream.write('TEST_ENDED %s\n' % json.dumps(resp))
120 self.stream.write('TEST_ASSUMPTION_FAILURE %s\n' % json.dumps(resp))
[all …]
Dbase_test.py31 def setUpDevice(self, serial, stream, options): argument
40 self.stream = stream
42 self.android_device = android_device.AndroidTestDevice(serial, stream)
53 self.stream.write('TEST_LOG %s\n' % json.dumps(resp))
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/
DV4Signature.java121 static V4Signature readFrom(InputStream stream) throws IOException { in readFrom() argument
122 final int version = readIntLE(stream); in readFrom()
126 final byte[] hashingInfo = readBytes(stream); in readFrom()
127 final byte[] signingInfo = readBytes(stream); in readFrom()
131 public void writeTo(OutputStream stream) throws IOException { in writeTo() argument
132 writeIntLE(stream, this.version); in writeTo()
133 writeBytes(stream, this.hashingInfo); in writeTo()
134 writeBytes(stream, this.signingInfo); in writeTo()
161 static void readFully(InputStream stream, byte[] buffer) throws IOException { in readFully() argument
165 int count = stream.read(buffer, n, len - n); in readFully()
[all …]
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/extractors/
DSystraceExtractor.kt28 override fun extract(stream: StreamingReader, processSubStream: (BufferProducer) -> Unit) { in <lambda>()
30 stream.onWindowReleased = null in <lambda>()
31 startIndex = START.find(stream, startIndex) in <lambda>()
34 if (!stream.loadIndex(startIndex)) return in <lambda>()
35 if (stream[startIndex] == '\n'.toByte()) startIndex++ in <lambda>()
40 stream.onWindowReleased = { window -> processWindow(window, pipe) } in <lambda>()
41 endIndex = END.find(stream, startIndex) in <lambda>()
43 endIndex = stream.endIndex in <lambda>()
45 stream.onWindowReleased = null in <lambda>()
46 stream.windows.forEach { processWindow(it, pipe) } in <lambda>()
DZlibExtractor.kt42 private class DeflateProducer(stream: StreamingReader, val feedback: ImportFeedback)
45 private val source = stream.source
50 stream.loadIndex(stream.startIndex + 1024) in <lambda>()
51 val offset = findStart(stream) in <lambda>()
52 val buffIter = stream.iter(offset) in <lambda>()
89 override fun extract(stream: StreamingReader, processSubStream: (BufferProducer) -> Unit) { in extract()
90 processSubStream(DeflateProducer(stream, feedback)) in extract()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DTestSuiteInfoTest.java58 FileInputStream stream = null; in testLoadConfig() local
68 stream = new FileInputStream(propertyFile); in testLoadConfig()
69 Properties p = instance.loadSuiteInfo(stream); in testLoadConfig()
77 StreamUtil.close(stream); in testLoadConfig()
84 FileInputStream stream = null; in testLoadConfig_multiArch() local
94 stream = new FileInputStream(propertyFile); in testLoadConfig_multiArch()
95 Properties p = instance.loadSuiteInfo(stream); in testLoadConfig_multiArch()
103 StreamUtil.close(stream); in testLoadConfig_multiArch()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DStreamUtil.java63 final InputStream stream = source.createInputStream(); in getStringFromSource() local
66 contents = getStringFromStream(stream); in getStringFromSource()
68 close(stream); in getStringFromSource()
99 final InputStream stream = source.createInputStream(); in getByteArrayListFromSource() local
102 contents = getByteArrayListFromStream(stream); in getByteArrayListFromSource()
104 close(stream); in getByteArrayListFromSource()
116 public static String getStringFromStream(InputStream stream) throws IOException { in getStringFromStream() argument
117 return getStringFromStream(stream, 0); in getStringFromStream()
128 public static String getStringFromStream(InputStream stream, long length) throws IOException { in getStringFromStream() argument
131 try (Reader ir = new BufferedReader(new InputStreamReader(stream))) { in getStringFromStream()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/
DSnapshotInputStreamSource.java36 public SnapshotInputStreamSource(String name, InputStream stream) { in SnapshotInputStreamSource() argument
37 if (stream == null) { in SnapshotInputStreamSource()
42 mBackingFile = createBackingFile(name, stream); in SnapshotInputStreamSource()
56 File createBackingFile(String name, InputStream stream) throws IOException { in createBackingFile() argument
59 FileUtil.writeToFile(stream, backingFile); in createBackingFile()
/tools/tradefederation/core/src/com/android/tradefed/util/testmapping/
DTestInfo.java27 import java.util.stream.Collectors;
168 mOptions.stream() in merge()
176 mOptions.stream() in merge()
180 mOptions.stream() in merge()
188 mOptions.stream() in merge()
194 .stream() in merge()
203 .stream() in merge()
208 .stream() in merge()
217 .stream() in merge()
279 mOptions.stream() in toString()
[all …]
DTestMapping.java48 import java.util.stream.Collectors;
49 import java.util.stream.Stream;
238 tests.stream() in mergeTests()
304 Stream<Path> stream = null; in getTests() local
309 stream = Files.walk(testMappingsRootPath, FileVisitOption.FOLLOW_LINKS); in getTests()
312 stream = getAllTestMappingPaths(testMappingsRootPath).stream(); in getTests()
314 stream.filter(path -> path.getFileName().toString().equals(TEST_MAPPING)) in getTests()
331 if (stream != null) { in getTests()
332 stream.close(); in getTests()
349 Stream<Path> stream = null; in getAllTests() local
[all …]
/tools/test/graphicsbenchmark/performance_tests/helper/src/com/android/game/qualification/
DGameCoreConfiguration.java19 import java.util.stream.Collectors;
45 getCertificationRequirements().stream() in validateConfiguration()
50 getApkInfo().stream() in validateConfiguration()
55 requirementNames.stream() in validateConfiguration()
76 return mCertificationRequirements.stream() in findCertificationRequirements()
/tools/tradefederation/core/tests/src/com/android/tradefed/result/error/
DErrorIdentifierTest.java29 import java.util.stream.Collectors;
41 List<String> names = errors.stream().map(e -> e.name()).collect(Collectors.toList()); in testUniqueErrors()
44 names.stream().filter(e -> !uniques.add(e)).collect(Collectors.toSet()); in testUniqueErrors()
53 errors.stream().map(e -> Long.toString(e.code())).collect(Collectors.toList()); in testUniqueErrors()
56 codes.stream().filter(e -> !uniqueCodes.add(e)).collect(Collectors.toSet()); in testUniqueErrors()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/utils/
DByteTracker.java48 public CloseableDelegateByteSource fromStream(@Nonnull InputStream stream) throws IOException { in fromStream() argument
49 byte[] data = ByteStreams.toByteArray(stream); in fromStream()
67 public CloseableDelegateByteSource fromStream(@Nonnull ByteArrayOutputStream stream)
69 byte[] data = stream.toByteArray();
/tools/metalava/src/main/java/com/android/tools/metalava/
DVersion.kt30 … val stream = BufferedInputStream(Version::class.java.getResourceAsStream("/version.properties")) constant
32 properties.load(stream)
34 stream.close()
/tools/tradefederation/core/src/com/android/tradefed/log/
DFileLogger.java98 SizeLimitedOutputStream stream = mOutputStream; in doCloseLog() local
100 StreamUtil.flushAndCloseStream(stream); in doCloseLog()
101 if (stream != null) { in doCloseLog()
102 stream.delete(); in doCloseLog()
/tools/tradefederation/core/common_util/com/android/tradefed/util/zip/
DEndCentralDirectoryInfo.java151 try (FileInputStream stream = new FileInputStream(zipFile)) { in getEndCentralDirectoryInfo() argument
152 long size = stream.getChannel().size(); in getEndCentralDirectoryInfo()
154 stream.skip(size - MAX_LOOKBACK); in getEndCentralDirectoryInfo()
158 stream.read(endCentralDir); in getEndCentralDirectoryInfo()
DLocalFileHeader.java104 try (FileInputStream stream = new FileInputStream(partialZipFile)) { in LocalFileHeader() argument
105 stream.skip(startOffset); in LocalFileHeader()
107 stream.read(data); in LocalFileHeader()
/tools/asuite/atest/
Datest_utils_unittest.py111 stream = open('/tmp/test_has_colors.txt', 'wb')
112 self.assertFalse(atest_utils._has_colors(stream))
113 stream.close()
116 stream = mock.Mock()
117 stream.isatty.return_value = False
118 self.assertFalse(atest_utils._has_colors(stream))
121 stream = mock.Mock()
122 stream.isatty.return_value = True
124 self.assertFalse(atest_utils._has_colors(stream))
127 stream = mock.Mock()
[all …]
Datest_utils.py269 def _has_colors(stream): argument
279 if stream in cached_has_colors:
280 return cached_has_colors[stream]
281 cached_has_colors[stream] = True
283 if not hasattr(stream, "isatty"):
284 cached_has_colors[stream] = False
286 if not stream.isatty():
288 cached_has_colors[stream] = False
293 cached_has_colors[stream] = curses.tigetnum("colors") > 2
297 cached_has_colors[stream] = False
[all …]
/tools/tradefederation/core/atest/
Datest_utils_unittest.py110 stream = open('/tmp/test_has_colors.txt', 'wb')
111 self.assertFalse(atest_utils._has_colors(stream))
112 stream.close()
115 stream = mock.Mock()
116 stream.isatty.return_value = False
117 self.assertFalse(atest_utils._has_colors(stream))
120 stream = mock.Mock()
121 stream.isatty.return_value = True
123 self.assertFalse(atest_utils._has_colors(stream))
126 stream = mock.Mock()
[all …]
Datest_utils.py264 def _has_colors(stream): argument
274 if stream in cached_has_colors:
275 return cached_has_colors[stream]
277 cached_has_colors[stream] = True
279 if not hasattr(stream, "isatty"):
280 cached_has_colors[stream] = False
282 if not stream.isatty():
284 cached_has_colors[stream] = False
289 cached_has_colors[stream] = curses.tigetnum("colors") > 2
293 cached_has_colors[stream] = False
[all …]
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/task/
DImportTask.kt38 private fun extractOrImport(stream: BufferProducer) { in extractOrImport()
40 val reader = StreamingReader(stream) in extractOrImport()
51 stream.close() in extractOrImport()
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
DDebugHostLogOnFailureCollector.java61 try (InputStream stream = source.createInputStream()) { in onTestFail() argument
62 stream.skip(offset); in onTestFail()
64 new SnapshotInputStreamSource("host-log-failure", stream)) { in onTestFail() argument

123456