Home
last modified time | relevance | path

Searched refs:inputStream (Results 1 – 25 of 35) sorted by relevance

12

/cts/tests/tests/content/src/android/content/res/cts/
DAssetManagerTest.java73 InputStream inputStream = mAssets.open(fileName); in testAssetOperations() local
74 assertThat(inputStream).isNotNull(); in testAssetOperations()
75 assertContextEquals(expect, inputStream); in testAssetOperations()
77 inputStream = mAssets.open(fileName, AssetManager.ACCESS_BUFFER); in testAssetOperations()
78 assertThat(inputStream).isNotNull(); in testAssetOperations()
79 assertContextEquals(expect, inputStream); in testAssetOperations()
206 private void assertContextEquals(final String expect, final InputStream inputStream) in assertContextEquals() argument
208 try (final BufferedReader bf = new BufferedReader(new InputStreamReader(inputStream))) { in assertContextEquals()
DAssetFileDescriptor_AutoCloseOutputStreamTest.java71 FileInputStream inputStream = mAssetFileDes.createInputStream(); in testAutoCloseOutputStream() local
73 assertEquals(FILE_DATA[i], inputStream.read()); in testAutoCloseOutputStream()
76 assertEquals(FILE_DATA[i], inputStream.read()); in testAutoCloseOutputStream()
78 assertEquals(FILE_END, inputStream.read()); in testAutoCloseOutputStream()
/cts/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/
DAccessPrivateDataTest.java84 FileInputStream inputStream = new FileInputStream(privateFile); in testAccessPrivateData() local
85 inputStream.read(); in testAccessPrivateData()
86 inputStream.close(); in testAccessPrivateData()
111 FileInputStream inputStream = new FileInputStream(publicFile); in testAccessPublicData() local
112 inputStream.read(); in testAccessPublicData()
113 inputStream.close(); in testAccessPublicData()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawableTest.java218 FileInputStream inputStream = null; in testCreateFromStream() local
238 inputStream = new FileInputStream(imageFile); in testCreateFromStream()
239 assertNotNull(Drawable.createFromStream(inputStream, "Sample")); in testCreateFromStream()
247 if (null != inputStream) { in testCreateFromStream()
248 inputStream.close(); in testCreateFromStream()
263 FileInputStream inputStream = null; in testCreateFromStream2() local
271 inputStream = new FileInputStream(imageFile) { in testCreateFromStream2()
278 assertNotNull(Drawable.createFromStream(inputStream, "Sample")); in testCreateFromStream2()
280 if (null != inputStream) { in testCreateFromStream2()
283 inputStream.close(); in testCreateFromStream2()
[all …]
/cts/libs/input/src/com/android/cts/input/
DHidJsonParser.java104 InputStream inputStream = mContext.getResources().openRawResource(id); in readRawResource() local
106 return readFully(inputStream); in readRawResource()
129 private String readFully(InputStream inputStream) throws IOException { in readFully() argument
132 int read = inputStream.read(buffer); in readFully()
135 read = inputStream.read(buffer); in readFully()
/cts/tests/tests/media/src/android/media/cts/
DHeifWriterTest.java107 InputStream inputStream = null; in setUp() local
110 inputStream = getContext().getResources().openRawResource(IMAGE_RESOURCES[i]); in setUp()
112 copy(inputStream, outputStream); in setUp()
114 closeQuietly(inputStream); in setUp()
437 FileInputStream inputStream = null; in doTest() local
462 inputStream = new FileInputStream(config.mInputPath); in doTest()
473 fillYuvBuffer(i, data, width, height, inputStream); in doTest()
520 if (inputStream != null) { in doTest()
521 inputStream.close(); in doTest()
542 @Nullable FileInputStream inputStream) throws IOException { in fillYuvBuffer() argument
[all …]
DUtils.java103 InputStream inputStream = new FileInputStream(pfd.getFileDescriptor()); in setAppOps() local
104 result = convertStreamToString(inputStream); in setAppOps()
DMediaMetadataRetrieverTest.java707 InputStream inputStream = null; in testGetImage() local
770 inputStream = getContext().getResources().openRawResource(resId); in testGetImage()
771 bitmap = BitmapFactory.decodeStream(inputStream); in testGetImage()
805 if (inputStream != null) { in testGetImage()
806 inputStream.close(); in testGetImage()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java99 DataInputStream inputStream = new DataInputStream(new FileInputStream(publicFile)); in accessPublicData() local
100 inputStream.readInt(); in accessPublicData()
101 inputStream.close(); in accessPublicData()
/cts/tests/accessibility/common/src/android/accessibility/cts/common/
DShellCommandBuilder.java94 try (InputStream inputStream = new FileInputStream(fd.getFileDescriptor())) { in execShellCommand() argument
96 new InputStreamReader(inputStream, StandardCharsets.UTF_8))) { in execShellCommand()
/cts/tests/tests/os/src/android/os/cts/
DPersistableBundleTest.java49 ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); in testWriteToStreamAndReadFromStream() local
50 PersistableBundle restoredBundle = PersistableBundle.readFromStream(inputStream); in testWriteToStreamAndReadFromStream()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DFileUtils.java109 public static boolean copyToFile(InputStream inputStream, File destFile) { in copyToFile() argument
118 while ((bytesRead = inputStream.read(buffer)) >= 0) { in copyToFile()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DFileUtils.java109 public static boolean copyToFile(InputStream inputStream, File destFile) { in copyToFile() argument
118 while ((bytesRead = inputStream.read(buffer)) >= 0) { in copyToFile()
/cts/tests/signature/lib/common/src/android/signature/cts/
DDexApiDocumentParser.java75 public Stream<DexMember> parseAsStream(InputStream inputStream) { in parseAsStream() argument
76 BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); in parseAsStream()
/cts/tests/tests/net/src/android/net/cts/
DLocalSocketTest.java345 private void testFlushWorks(OutputStream outputStream, InputStream inputStream) in testFlushWorks() argument
348 StreamReader inputStreamReader = new StreamReader(inputStream, bytesToTransfer); in testFlushWorks()
352 assertEquals(bytesToTransfer, inputStream.available()); in testFlushWorks()
363 assertEquals(0, inputStream.available()); in testFlushWorks()
/cts/hostsidetests/theme/src/android/theme/cts/
DThemeHostTest.java176 InputStreamSource inputStream = new FileInputStreamSource(comparison.second); in testThemes() local
179 addTestLog(comparison.first, LogDataType.PNG, inputStream); in testThemes()
181 StreamUtil.cancel(inputStream); in testThemes()
/cts/tests/app/src/android/app/cts/
DDownloadManagerTestBase.java222 try (InputStream inputStream = context.getContentResolver().openInputStream(uri)) { in readContentsFromUri() argument
223 return readFromInputStream(inputStream); in readContentsFromUri()
292 private static String readFromInputStream(InputStream inputStream) throws Exception { in readFromInputStream() argument
296 while ((bytesRead = inputStream.read(buf)) != -1) { in readFromInputStream()
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContacts_PeopleTest.java254 InputStream inputStream = context.getResources().openRawResource( in testAccessPhotoData() local
256 int size = inputStream.available(); in testAccessPhotoData()
258 inputStream.read(data); in testAccessPhotoData()
/cts/tests/tests/text/src/android/text/method/cts/
DPasswordTransformationMethodTest.java143 InputStream inputStream = new FileInputStream(pfd.getFileDescriptor()); in enableAppOps() local
144 result = convertStreamToString(inputStream); in enableAppOps()
/cts/tests/tests/security/src/android/security/cts/
DMotionEventTest.java181 InputStream inputStream = new FileInputStream(pfd.getFileDescriptor()); in enableAppOps() local
182 result = convertStreamToString(inputStream); in enableAppOps()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DTriggerContentTest.java148 public static void copyToFileOrThrow(InputStream inputStream, File destFile) in copyToFileOrThrow() argument
158 while ((bytesRead = inputStream.read(buffer)) >= 0) { in copyToFileOrThrow()
168 inputStream.close(); in copyToFileOrThrow()
/cts/libs/testserver/src/android/webkit/cts/
DTestWebServer.java534 InputStream inputStream = new ByteArrayInputStream(bytes); in getKeyManagers() local
537 keyStore.load(inputStream, PASSWORD.toCharArray()); in getKeyManagers()
538 inputStream.close(); in getKeyManagers()
/cts/tests/tests/util/src/android/util/cts/
DStrictJarFileTest.java357 private static String readUtf8String(InputStream inputStream) throws IOException { in readUtf8String() argument
361 while ((byteCount = inputStream.read(readBuffer)) != -1) { in readUtf8String()
/cts/tests/tests/text/src/android/text/format/cts/
DDateFormatTest.java115 InputStream inputStream = new FileInputStream(pfd.getFileDescriptor()); in enableAppOps() local
116 result = convertStreamToString(inputStream); in enableAppOps()
/cts/hostsidetests/compilation/src/android/compilation/cts/
DAdbRootDependentCompilationTest.java97 InputStream inputStream = getClass().getResourceAsStream("/CtsCompilationApp.apk"); in setUp() local
98 ByteStreams.copy(inputStream, outputStream); in setUp()

12