Home
last modified time | relevance | path

Searched refs:baos (Results 1 – 25 of 36) sorted by relevance

12

/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DXmlUtilsTest.java39 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in testMapWithNullKeys() local
43 XmlUtils.writeMapXml(map, baos); in testMapWithNullKeys()
45 InputStream mapInput = new ByteArrayInputStream(baos.toByteArray()); in testMapWithNullKeys()
54 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in testreadWriteXmlByteArrayValue() local
56 serializer.setOutput(baos, StandardCharsets.UTF_8.name()); in testreadWriteXmlByteArrayValue()
61 InputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testreadWriteXmlByteArrayValue()
DFastXmlSerializerTest.java67 try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in checkPreserved() argument
69 out.setOutput(baos, StandardCharsets.UTF_16.name()); in checkPreserved()
78 baos.flush(); in checkPreserved()
79 data = baos.toByteArray(); in checkPreserved()
90 try (final ByteArrayInputStream baos = new ByteArrayInputStream(data)) { in checkPreserved() argument
92 parser.setInput(baos, StandardCharsets.UTF_16.name()); in checkPreserved()
/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/src/com/android/framework/multidexlegacycorrupteddex/
DCorruptedDexTest.java59 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSupressedExceptions()
60 PrintStream ps = new PrintStream(baos); in testSupressedExceptions()
64 + baos.toString(), in testSupressedExceptions()
65 baos.toString().contains("IOException")); in testSupressedExceptions()
/frameworks/base/core/tests/coretests/src/android/util/
DBase64Test.java446 ByteArrayOutputStream baos; in testOutputStream() local
454 baos = new ByteArrayOutputStream(); in testOutputStream()
455 b64os = new Base64OutputStream(baos, flags); in testOutputStream()
458 actual = baos.toByteArray(); in testOutputStream()
462 baos = new ByteArrayOutputStream(); in testOutputStream()
463 b64os = new Base64OutputStream(baos, flags); in testOutputStream()
468 actual = baos.toByteArray(); in testOutputStream()
473 baos = new ByteArrayOutputStream(); in testOutputStream()
474 b64os = new Base64OutputStream(baos, flags); in testOutputStream()
491 actual = baos.toByteArray(); in testOutputStream()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationChannelTest.java74 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testEmptyVibration_noException() local
75 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testEmptyVibration_noException()
85 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testBackupEmptySound() local
86 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testBackupEmptySound()
91 new ByteArrayInputStream(baos.toByteArray())), null); in testBackupEmptySound()
DZenModeHelperTest.java167 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurge() local
168 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurge()
174 return baos; in writeXmlAndPurge()
180 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurgeForUser() local
181 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurgeForUser()
189 return baos; in writeXmlAndPurgeForUser()
192 private XmlPullParser getParserForByteStream(ByteArrayOutputStream baos) throws Exception { in getParserForByteStream() argument
195 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), null); in getParserForByteStream()
730 ByteArrayOutputStream baos = writeXmlAndPurge(null); in testWriteXml() local
731 XmlPullParser parser = getParserForByteStream(baos); in testWriteXml()
[all …]
DPreferencesHelperTest.java189 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurge() local
190 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurge()
198 return baos; in writeXmlAndPurge()
276 ByteArrayOutputStream baos = writeXmlAndPurge(package10, uid10, true, 10); in testWriteXml_onlyBackupsTargetUser() local
283 loadStreamXml(baos, true, 0); in testWriteXml_onlyBackupsTargetUser()
284 loadStreamXml(baos, true, 10); in testWriteXml_onlyBackupsTargetUser()
301 ByteArrayOutputStream baos = writeXmlAndPurge(package0, uid0, true, 0); in testReadXml_onlyRestoresTargetUser() local
310 loadStreamXml(baos, true, 10); in testReadXml_onlyRestoresTargetUser()
346 ByteArrayOutputStream baos = writeXmlAndPurge(PKG_N_MR1, UID_N_MR1, false, in testChannelXml() local
352 loadStreamXml(baos, false, UserHandle.USER_ALL); in testChannelXml()
[all …]
DZenModeConfigTest.java173 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testRuleXml() local
174 out.setOutput(new BufferedOutputStream(baos), "utf-8"); in testRuleXml()
183 new ByteArrayInputStream(baos.toByteArray())), null); in testRuleXml()
/frameworks/base/tests/HierarchyViewerTest/src/com/android/test/hierarchyviewer/
DMainActivityTest.java32 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024 * 1024); in encode() local
34 Object encoder = createEncoder(baos); in encode()
38 return baos.toByteArray(); in encode()
52 private Object createEncoder(ByteArrayOutputStream baos) throws ClassNotFoundException, in createEncoder() argument
57 return constructor.newInstance(baos); in createEncoder()
/frameworks/base/identity/java/android/security/identity/
DUtil.java64 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in publicKeyEncodeUncompressedForm() local
65 baos.write(0x04); in publicKeyEncodeUncompressedForm()
66 baos.write(x); in publicKeyEncodeUncompressedForm()
67 baos.write(y); in publicKeyEncodeUncompressedForm()
68 return baos.toByteArray(); in publicKeyEncodeUncompressedForm()
/frameworks/base/core/java/com/android/server/backup/
DUsageStatsBackupHelper.java38 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBackupPayload() local
39 DataOutputStream out = new DataOutputStream(baos); in getBackupPayload()
45 baos.reset(); in getBackupPayload()
47 return baos.toByteArray(); in getBackupPayload()
/frameworks/base/services/core/java/com/android/server/timezone/
DCheckToken.java46 ByteArrayOutputStream baos = new ByteArrayOutputStream(12 /* (3 * sizeof(int)) */); in toByteArray() local
47 try (DataOutputStream dos = new DataOutputStream(baos)) { in toByteArray()
54 return baos.toByteArray(); in toByteArray()
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
DURLFetcher.java139 ByteArrayOutputStream baos = new ByteArrayOutputStream(length); in inputStreamToString() local
144 baos.write(buffer, 0, len); in inputStreamToString()
145 if (baos.size() > sizeLimit) { in inputStreamToString()
150 return baos.toString("UTF-8"); in inputStreamToString()
/frameworks/opt/chips/src/com/android/ex/chips/
DDefaultPhotoManager.java112 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in fetchPhotoAsync()
116 baos.write(buffer, 0, size); in fetchPhotoAsync()
121 return baos.toByteArray(); in fetchPhotoAsync()
/frameworks/layoutlib/bridge/src/android/graphics/
DNinePatch_Delegate.java77 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in serialize() local
80 oos = new ObjectOutputStream(baos); in serialize()
95 byte[] array = baos.toByteArray(); in serialize()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerServiceUserInfoTest.java78 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteReadUserInfo() local
79 DataOutputStream out = new DataOutputStream(baos); in testWriteReadUserInfo()
81 byte[] bytes = baos.toByteArray(); in testWriteReadUserInfo()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DPersistentDataStoreTest.java157 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoreAndReloadOfBrightnessConfigurations() local
158 mInjector.setWriteStream(baos); in testStoreAndReloadOfBrightnessConfigurations()
164 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testStoreAndReloadOfBrightnessConfigurations()
DAmbientBrightnessStatsTrackerTest.java333 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteThenReadAmbientBrightnessStats() local
334 statsTracker.writeStats(baos); in testWriteThenReadAmbientBrightnessStats()
335 baos.flush(); in testWriteThenReadAmbientBrightnessStats()
337 ByteArrayInputStream input = new ByteArrayInputStream(baos.toByteArray()); in testWriteThenReadAmbientBrightnessStats()
/frameworks/base/telephony/java/com/android/internal/telephony/cdma/
DSmsMessage.java1009 ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
1010 DataOutputStream dos = new DataOutputStream(baos);
1029 pdu.encodedMessage = baos.toByteArray();
1075 ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
1076 DataOutputStream dos = new DataOutputStream(baos);
1095 pdu.encodedMessage = baos.toByteArray();
1112 ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
1113 DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(baos));
1145 mPdu = baos.toByteArray();
/frameworks/base/telephony/java/android/telephony/
DUiccAccessRule.java77 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encodeRules() local
78 DataOutputStream output = new DataOutputStream(baos); in encodeRules()
93 return baos.toByteArray(); in encodeRules()
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/
DBitmapUtils.java242 ByteArrayOutputStream baos = new ByteArrayOutputStream(65536); in compressToBytes() local
243 bitmap.compress(CompressFormat.JPEG, quality, baos); in compressToBytes()
244 return baos.toByteArray(); in compressToBytes()
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsDatabase.java931 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBackupPayload() local
934 DataOutputStream out = new DataOutputStream(baos); in getBackupPayload()
970 if (DEBUG) Slog.i(TAG, "Written " + baos.size() + " bytes of data"); in getBackupPayload()
973 baos.reset(); in getBackupPayload()
976 return baos.toByteArray(); in getBackupPayload()
1097 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in serializeIntervalStats() local
1098 DataOutputStream out = new DataOutputStream(baos); in serializeIntervalStats()
1104 baos.reset(); in serializeIntervalStats()
1106 return baos.toByteArray(); in serializeIntervalStats()
/frameworks/base/core/java/android/net/
DNetworkPolicy.java253 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBytesForBackup() local
254 DataOutputStream out = new DataOutputStream(baos); in getBytesForBackup()
266 return baos.toByteArray(); in getBytesForBackup()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsBackupAgent.java555 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getLockSettings() local
556 DataOutputStream out = new DataOutputStream(baos); in getLockSettings()
577 return baos.toByteArray(); in getLockSettings()
885 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getNetworkPolicies() local
887 DataOutputStream out = new DataOutputStream(baos); in getNetworkPolicies()
906 baos.reset(); in getNetworkPolicies()
909 return baos.toByteArray(); in getNetworkPolicies()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/
DCdmaInboundSmsHandler.java108 ByteArrayOutputStream baos = new ByteArrayOutputStream(100); in CdmaInboundSmsHandler()
109 DataOutputStream dos = new DataOutputStream(baos); in CdmaInboundSmsHandler()
129 mPhone.mCi.sendCdmaSms(baos.toByteArray(), null); in CdmaInboundSmsHandler()

12