/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | XmlUtilsTest.java | 39 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()
|
D | FastXmlSerializerTest.java | 67 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/ |
D | CorruptedDexTest.java | 59 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/ |
D | Base64Test.java | 446 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/ |
D | NotificationChannelTest.java | 74 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()
|
D | ZenModeHelperTest.java | 167 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 …]
|
D | PreferencesHelperTest.java | 189 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 …]
|
D | ZenModeConfigTest.java | 173 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/ |
D | MainActivityTest.java | 32 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/ |
D | Util.java | 64 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/ |
D | UsageStatsBackupHelper.java | 38 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/ |
D | CheckToken.java | 46 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/ |
D | URLFetcher.java | 139 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/ |
D | DefaultPhotoManager.java | 112 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/ |
D | NinePatch_Delegate.java | 77 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/ |
D | UserManagerServiceUserInfoTest.java | 78 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/ |
D | PersistentDataStoreTest.java | 157 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoreAndReloadOfBrightnessConfigurations() local 158 mInjector.setWriteStream(baos); in testStoreAndReloadOfBrightnessConfigurations() 164 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testStoreAndReloadOfBrightnessConfigurations()
|
D | AmbientBrightnessStatsTrackerTest.java | 333 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/ |
D | SmsMessage.java | 1009 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/ |
D | UiccAccessRule.java | 77 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/ |
D | BitmapUtils.java | 242 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/ |
D | UsageStatsDatabase.java | 931 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/ |
D | NetworkPolicy.java | 253 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/ |
D | SettingsBackupAgent.java | 555 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/ |
D | CdmaInboundSmsHandler.java | 108 ByteArrayOutputStream baos = new ByteArrayOutputStream(100); in CdmaInboundSmsHandler() 109 DataOutputStream dos = new DataOutputStream(baos); in CdmaInboundSmsHandler() 129 mPhone.mCi.sendCdmaSms(baos.toByteArray(), null); in CdmaInboundSmsHandler()
|