Home
last modified time | relevance | path

Searched refs:StreamUtil (Results 1 – 25 of 112) sorted by relevance

12345

/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DStreamUtilTest.java45 final ByteArrayList output = StreamUtil.getByteArrayListFromStream(stream); in testGetByteArrayListFromSource()
62 final ByteArrayList output = StreamUtil.getByteArrayListFromStream( in testGetByteArrayListFromStream()
80 final String output = StreamUtil.getStringFromStream(stream); in testGetStringFromSource()
93 output = StreamUtil.getBufferedReaderFromStreamSrc(source); in testGetBufferedReaderFromInputStream()
109 assertEquals(3, StreamUtil.countLinesFromSource(source)); in testCountLinesFromSource()
118 final String output = StreamUtil.getStringFromStream( in testGetStringFromStream()
130 StreamUtil.getStringFromStream(new ByteArrayInputStream(contents.getBytes()), 5); in testGetStringFromStream_withLength()
144 long actualCrc32 = StreamUtil.calculateCrc32(inputSource); in testCalculateCrc32()
158 String actualMd5 = StreamUtil.calculateMd5(inputSource); in testCalculateMd5()
172 String actualBase64Md5 = StreamUtil.calculateBase64Md5(inputSource); in testCalculateBase64Md5()
[all …]
DSubprocessTestResultsParserTest.java125 StreamUtil.close(resultParser); in testParse_randomEvents()
167 StreamUtil.close(resultParser); in testParse_invalidEventOrder()
206 StreamUtil.close(resultParser); in testParse_testNotStarted()
249 StreamUtil.close(resultParser); in testParse_noTimeStamp()
282 StreamUtil.close(resultParser); in testParse_invocationFailed()
324 StreamUtil.close(socket); in testParser_receiveFromSocket()
328 StreamUtil.close(resultParser); in testParser_receiveFromSocket()
329 StreamUtil.close(socket); in testParser_receiveFromSocket()
346 StreamUtil.close(resultParser); in testParser_failToJoin()
387 StreamUtil.close(resultParser); in testParse_testTag()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DLogFileSaverTest.java22 import com.android.tradefed.util.StreamUtil;
138 String timestamp = StreamUtil.getStringFromStream(new FileInputStream(retentionFile)); in testGetFileDir_retention()
190 String actualLogString = StreamUtil.getStringFromStream(gzipStream); in testSaveAndGZipLogData()
193 StreamUtil.close(gzipStream); in testSaveAndGZipLogData()
215 String actualLogString = StreamUtil.getStringFromStream(zipFile.getInputStream( in testSaveAndZipLogData()
246 StreamUtil.copyStreams(mockInput, gzipOutStream); in testCreateAndGZipLogData()
247 StreamUtil.close(gzipOutStream); in testCreateAndGZipLogData()
252 String actualLogString = StreamUtil.getStringFromStream(gzipInputStream); in testCreateAndGZipLogData()
255 StreamUtil.close(gzipInputStream); in testCreateAndGZipLogData()
276 StreamUtil.close(logFileReader); in testSaveLogDataRaw()
DFileSystemLogSaverTest.java26 import com.android.tradefed.util.StreamUtil;
153 String timestamp = StreamUtil.getStringFromStream(new FileInputStream(retentionFile)); in testGetFileDir_retention()
184 String actualLogString = StreamUtil.getStringFromStream(zipFile.getInputStream( in testSaveLogData_uncompressed()
188 StreamUtil.close(logFileReader); in testSaveLogData_uncompressed()
219 StreamUtil.close(logFileReader); in testSaveLogData_compressed()
247 StreamUtil.close(logFileReader); in testSaveLogDataRaw()
/tools/tradefederation/core/src/com/android/tradefed/util/
DTarUtil.java115 StreamUtil.close(outputFileStream); in unTar()
123 StreamUtil.close(debInputStream); in unTar()
124 StreamUtil.close(is); in unTar()
152 StreamUtil.close(in); in unGzip()
153 StreamUtil.close(out); in unGzip()
178 StreamUtil.close(in); in gzip()
179 StreamUtil.close(out); in gzip()
226 StreamUtil.cancel(inputStream); in extractAndLog()
242 StreamUtil.cancel(s); in extractAndLog()
DSerializationUtil.java52 StreamUtil.close(out); in serialize()
53 StreamUtil.close(fileOut); in serialize()
74 StreamUtil.close(out); in serializeToString()
75 StreamUtil.close(byteOut); in serializeToString()
96 StreamUtil.close(in); in deserialize()
97 StreamUtil.close(bais); in deserialize()
119 StreamUtil.close(in); in deserialize()
120 StreamUtil.close(fileIn); in deserialize()
/tools/tradefederation/core/src/com/android/tradefed/sandbox/
DTradefedSandbox.java48 import com.android.tradefed.util.StreamUtil;
138 result.setStdout(StreamUtil.getStackTrace(interrupted)); in run()
281 StreamUtil.close(mEventParser); in tearDown()
282 StreamUtil.close(mProtoReceiver); in tearDown()
283 StreamUtil.close(mStdout); in tearDown()
284 StreamUtil.close(mStderr); in tearDown()
411 StreamUtil.close(mEventParser); in prepareConfiguration()
412 StreamUtil.close(mProtoReceiver); in prepareConfiguration()
505 StreamUtil.close(pw); in handleChildMissingConfig()
515 StreamUtil.cancel(fileInput); in logAndCleanHeapDump()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DFileUtil.java589 return StreamUtil.getStringFromStream(is); in readStringFromFile()
591 return StreamUtil.getStringFromStream(is, length); in readStringFromFile()
658 StreamUtil.copyStreams(origStream, destStream, startOffset, size); in writeToFile()
660 StreamUtil.close(origStream); in writeToFile()
661 StreamUtil.flushAndCloseStream(destStream); in writeToFile()
770 StreamUtil.close(stream1); in compareFileContents()
771 StreamUtil.close(stream2); in compareFileContents()
1069 return StreamUtil.calculateCrc32(inputSource); in calculateCrc32()
1082 return StreamUtil.calculateMd5(inputSource); in calculateMd5()
1094 return StreamUtil.calculateBase64Md5(inputSource); in calculateBase64Md5()
[all …]
DZipUtil.java187 StreamUtil.close(out); in createZip()
235 StreamUtil.close(out); in createZip()
312 StreamUtil.close(out); in gzipFile()
328 StreamUtil.copyStreams(inputStream, out); in writeToStream()
330 StreamUtil.close(inputStream); in writeToStream()
DStreamUtil.java47 public class StreamUtil { class
52 private StreamUtil() { in StreamUtil() method in StreamUtil
270 StreamUtil.copyStreams(inStream, outStream); in copyFileToStream()
272 StreamUtil.close(inStream); in copyFileToStream()
/tools/tradefederation/core/common_util/com/android/tradefed/util/net/
DHttpHelper.java24 import com.android.tradefed.util.StreamUtil;
122 StreamUtil.close(remote); in doGet()
135 StreamUtil.copyStreams(remote, outputStream); in doGet()
137 StreamUtil.close(remote); in doGet()
151 StreamUtil.close(remote); in doGetIgnore()
399 StreamUtil.close(outputStream); in run()
400 StreamUtil.close(inputStream); in run()
401 StreamUtil.close(outputStreamWriter); in run()
/tools/tradefederation/core/src/com/android/tradefed/result/
DLogFileSaver.java22 import com.android.tradefed.util.StreamUtil;
247 StreamUtil.copyStreams(bufInput, outStream); in saveAndGZipLogData()
251 StreamUtil.close(bufInput); in saveAndGZipLogData()
252 StreamUtil.close(outStream); in saveAndGZipLogData()
283 StreamUtil.copyStreams(bufInput, outStream); in saveAndZipLogData()
287 StreamUtil.close(bufInput); in saveAndZipLogData()
288 StreamUtil.closeZipStream(outStream); in saveAndZipLogData()
DFileSystemLogSaver.java25 import com.android.tradefed.util.StreamUtil;
138 StreamUtil.copyStreams(bufferedDataStream, outputStream); in saveLogData()
142 StreamUtil.close(bufferedDataStream); in saveLogData()
143 StreamUtil.close(outputStream); in saveLogData()
/tools/tradefederation/core/tests/src/com/android/tradefed/log/
DFileLoggerTest.java32 import com.android.tradefed.util.StreamUtil;
91 StreamUtil.close(logFileReader); in testLogToLogger()
92 StreamUtil.cancel(logSource); in testLogToLogger()
220 String content = StreamUtil.getStringFromSource(logSource); in testFiltering_ddms()
223 StreamUtil.cancel(logSource); in testFiltering_ddms()
245 String content = StreamUtil.getStringFromSource(logSource); in testFiltering_ddms_log()
248 StreamUtil.cancel(logSource); in testFiltering_ddms_log()
/tools/tradefederation/core/src/com/android/tradefed/cluster/
DClusterClient.java21 import com.android.tradefed.util.StreamUtil;
151 final String content = StreamUtil.getStringFromStream(response.getContent()); in getTestEnvironment()
168 final String content = StreamUtil.getStringFromStream(response.getContent()); in getTestResources()
191 final String content = StreamUtil.getStringFromStream(response.getContent()); in getTestContext()
211 final String content = StreamUtil.getStringFromStream(response.getContent()); in updateTestContext()
230 String content = StreamUtil.getStringFromStream(response.getContent()); in getCommandStatus()
256 response = StreamUtil.getStringFromStream(content); in parseCommandTasks()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DHostTest.java45 import com.android.tradefed.util.StreamUtil;
530 FailureDescription.create(StreamUtil.getStackTrace(e)); in run()
550 StreamUtil.close(cl); in run()
594 FailureDescription.create(StreamUtil.getStackTrace(e)); in runTestClasses()
629 FailureDescription.create(StreamUtil.getStackTrace(e)); in runTestCases()
940 StreamUtil.close(cl); in getClasses()
994 className, jarName, StreamUtil.getStackTrace(ucve))); in getClasses()
1016 StreamUtil.close(jarFile); in getClasses()
1265 StreamUtil.close(cl); in split()
/tools/tradefederation/core/clearcut_client/com/android/tradefed/clearcut/
DClearcutClient.java29 import com.android.tradefed.util.StreamUtil;
279 String message = StreamUtil.getStringFromStream(errorStream); in sendToClearcut()
285 StreamUtil.close(outputStream); in sendToClearcut()
286 StreamUtil.close(inputStream); in sendToClearcut()
287 StreamUtil.close(outputStreamWriter); in sendToClearcut()
288 StreamUtil.close(errorStream); in sendToClearcut()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DTestDeviceFuncTest.java41 import com.android.tradefed.util.StreamUtil;
98 String data = StreamUtil.getStringFromStream(bugreport.createInputStream()); in testBugreport()
105 StreamUtil.cancel(bugreport); in testBugreport()
127 StreamUtil.cancel(f); in testBugreportz()
381 StreamUtil.close(stream1); in compareFiles()
382 StreamUtil.close(stream2); in compareFiles()
900 StreamUtil.close(screenshot); in testScreenshot()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/junit4/
DJUnit4ResultForwarder.java28 import com.android.tradefed.util.StreamUtil;
124 StreamUtil.cancel(log.mDataStream); in testFinished()
161 mListener.testAssumptionFailure(testid, StreamUtil.getStackTrace(t)); in handleFailures()
163 mListener.testFailed(testid, StreamUtil.getStackTrace(t)); in handleFailures()
179 sb.append(String.format("\n %s", StreamUtil.getStackTrace(e))); in getMultiFailureStack()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/mobly/
DMoblyBinaryHostTest.java41 import com.android.tradefed.util.StreamUtil;
259 StreamUtil.close(inputStream); in processTestResults()
289 StreamUtil.close(inputStream); in updateConfigFile()
290 StreamUtil.close(fileWriter); in updateConfigFile()
376 StreamUtil.close(dataStream); in reportLogs()
/tools/tradefederation/core/src/com/android/tradefed/command/remote/
DRemoteManager.java29 import com.android.tradefed.util.StreamUtil;
502 StreamUtil.close(serverSocket); in closeSocket()
506 StreamUtil.close(clientSocket); in closeSocket()
510 StreamUtil.close(in); in closeReader()
514 StreamUtil.close(out); in closeWriter()
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DSubprocessTfLauncher.java42 import com.android.tradefed.util.StreamUtil;
424 StreamUtil.close(stdout); in run()
425 StreamUtil.close(stderr); in run()
432 StreamUtil.close(eventParser); in run()
433 StreamUtil.close(protoReceiver); in run()
/tools/tradefederation/contrib/src/com/android/media/tests/
DVideoEditingMemoryTest.java37 import com.android.tradefed.util.StreamUtil;
164 StreamUtil.cancel(outputSource); in uploadHeapDumpFiles()
205 StreamUtil.cancel(outputSource); in logOutputFiles()
219 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile()
DMediaMemoryTest.java37 import com.android.tradefed.util.StreamUtil;
173 StreamUtil.cancel(outputSource); in uploadHeapDumpFiles()
212 StreamUtil.cancel(outputSource); in logOutputFiles()
228 contents = StreamUtil.getStringFromStream(dataStream); in parseOutputFile()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/net/
DHttpHelperTest.java27 import com.android.tradefed.util.StreamUtil;
135 StreamUtil.flushAndCloseStream(out); in testDoGetStream()
325 StreamUtil.close(mInputStream); in close()
326 StreamUtil.close(mOutputStream); in close()

12345