Home
last modified time | relevance | path

Searched refs:UTF_8 (Results 1 – 25 of 378) sorted by relevance

12345678910>>...16

/aosp12/frameworks/base/core/tests/coretests/src/android/net/
H A DUriCodecTest.java31 StandardCharsets.UTF_8, in testDecode_emptyString_returnsEmptyString()
40 StandardCharsets.UTF_8, in testDecode_wrongHexDigit_fails()
53 StandardCharsets.UTF_8, in testDecode_secondHexDigitWrong_fails()
66 StandardCharsets.UTF_8, in testDecode_endsWithPercent_fails()
78 StandardCharsets.UTF_8, in testDecode_dontThrowException_appendsUnknownCharacter()
86 StandardCharsets.UTF_8, in testDecode_convertPlus()
95 StandardCharsets.UTF_8, in testDecode_lastCharacter()
105 StandardCharsets.UTF_8, in testDecode_secondRowOfEncoded()
/aosp12/frameworks/base/tools/powermodel/test/com/android/powermodel/
H A DCsvParserTest.java64 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEmpty()
76 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testOnlyNewline()
88 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testTwoLines()
103 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedEmpty()
116 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedText()
129 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedQuotes()
142 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedCommas()
155 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedQuotesAndCommas()
168 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testNoNewline()
181 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testNoNewlineWithCommas()
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/android/os/
H A DFileBridgeTest.java92 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync()
94 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync()
99 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync()
102 assertContents("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync()
107 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
109 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
111 assertContents("meowcake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
123 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
126 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
130 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
/aosp12/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/cdc/
H A DContentDefinedChunkerTest.java25 import static java.nio.charset.StandardCharsets.UTF_8;
51 private static final byte[] CHUNK_BOUNDARY_BYTES = CHUNK_BOUNDARY.getBytes(UTF_8);
122 (CHUNK_1 + CHUNK_BOUNDARY + CHUNK_2 + CHUNK_BOUNDARY + CHUNK_3).getBytes(UTF_8); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries()
126 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries()
141 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withSmallChunks_combinesChunksUntilMinSize()
153 Arrays.fill(largeInput, "a".getBytes(UTF_8)[0]); in chunkify_doesNotProduceChunksLargerThanMaxSize()
157 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_doesNotProduceChunksLargerThanMaxSize()
160 Arrays.fill(expectedChunkBytes, "a".getBytes(UTF_8)[0]); in chunkify_doesNotProduceChunksLargerThanMaxSize()
161 String expectedChunk = new String(expectedChunkBytes, UTF_8); in chunkify_doesNotProduceChunksLargerThanMaxSize()
183 byte[] input = (SMALL_CHUNK + CHUNK_BOUNDARY + CHUNK_2).getBytes(UTF_8); in chunkify_withInputStreamReturningZeroAvailability_returnsChunks()
[all …]
/aosp12/packages/modules/GeoTZ/s2storage/src/test/java/com/android/timezone/location/storage/block/
H A DBlockFileTest.java58 byte[] block1ExtraBytes = "Extra bytes 1".getBytes(StandardCharsets.UTF_8); in testReadWrite()
59 byte[] block1DataBytes = "Block 1 bytes".getBytes(StandardCharsets.UTF_8); in testReadWrite()
60 byte[] block2ExtraBytes = "Extra bytes 2".getBytes(StandardCharsets.UTF_8); in testReadWrite()
61 byte[] block2DataBytes = "Block 2 bytes".getBytes(StandardCharsets.UTF_8); in testReadWrite()
101 byte[] block1DataBytes = "Block 1 bytes".getBytes(StandardCharsets.UTF_8); in blockIdBounds()
102 byte[] block2DataBytes = "Block 2 bytes".getBytes(StandardCharsets.UTF_8); in blockIdBounds()
124 byte[] block1ExtraBytes = "Extra bytes 1".getBytes(StandardCharsets.UTF_8); in visit()
125 byte[] block1DataBytes = "Block 1 bytes".getBytes(StandardCharsets.UTF_8); in visit()
126 byte[] block2ExtraBytes = "Extra bytes 2".getBytes(StandardCharsets.UTF_8); in visit()
127 byte[] block2DataBytes = "Block 2 bytes".getBytes(StandardCharsets.UTF_8); in visit()
/aosp12/packages/services/Telephony/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/protocol/msrp/
H A DMsrpSerializer.java19 import static java.nio.charset.StandardCharsets.UTF_8;
57 outputStream.write(chunk.method().name().getBytes(UTF_8)); in writeRequestLine()
60 (chunk.responseCode() + " " + chunk.responseReason()).getBytes(UTF_8)); in writeRequestLine()
68 outputStream.write(header.name().getBytes(UTF_8)); in writeHeader()
70 outputStream.write(header.value().getBytes(UTF_8)); in writeHeader()
77 outputStream.write(chunk.transactionId().getBytes(UTF_8)); in writeEndLine()
H A DMsrpConstants.java19 import static java.nio.charset.StandardCharsets.UTF_8;
27 public static final byte[] MSRP_PROTOCOL_BYTES = MSRP_PROTOCOL.getBytes(UTF_8);
29 public static final byte[] NEW_LINE_BYTES = NEW_LINE.getBytes(UTF_8);
31 public static final byte[] END_MSRP_MSG_BYTES = END_MSRP_MSG.getBytes(UTF_8);
/aosp12/frameworks/base/core/tests/coretests/src/android/util/
H A DBinaryXmlTest.java58 out.setOutput(os, StandardCharsets.UTF_8.name()); in testLargeInterned_Binary()
68 in.setInput(is, StandardCharsets.UTF_8.name()); in testLargeInterned_Binary()
96 firstIn.setInput(is, StandardCharsets.UTF_8.name()); in doTranscode()
98 secondOut.setOutput(os, StandardCharsets.UTF_8.name()); in doTranscode()
113 xml.setOutput(os, StandardCharsets.UTF_8.name()); in testResolve_File()
124 xml.setOutput(os, StandardCharsets.UTF_8.name()); in testResolve_File()
139 xml.setOutput(os, StandardCharsets.UTF_8.name()); in testResolve_Memory()
156 xml.setOutput(os, StandardCharsets.UTF_8.name()); in testResolve_Memory()
H A DXmlTest.java83 out.setOutput(os, StandardCharsets.UTF_8.name()); in doLargeValues()
91 in.setInput(is, StandardCharsets.UTF_8.name()); in doLargeValues()
170 out.setOutput(os, StandardCharsets.UTF_8.name()); in doPersistableBundleWrite()
181 in.setInput(is, StandardCharsets.UTF_8.name()); in doPersistableBundleRead()
218 out.setOutput(os, StandardCharsets.UTF_8.name()); in doVerify()
223 in.setInput(is, StandardCharsets.UTF_8.name()); in doVerify()
233 out.startDocument(StandardCharsets.UTF_8.name(), true); in doVerifyWrite()
/aosp12/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
H A DScanResultUtilTest.java53 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in convertScanResult()
69 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in convertScanResultWithAnqpLines()
84 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in convertScanResultWithoutWifiSsid()
98 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testNetworkCreationFromScanResult()
198 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testPskSha256SaeTransitionModeCheck()
217 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testPskSaeTransitionModeCheck()
236 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testPskNotInTransitionModeCheck()
255 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testSaeNotInTransitionModeCheck()
274 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testFtEapAkmSupportedNetwork()
294 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testFilsSha256AkmSupportedNetwork()
[all …]
H A DXmlUtilTest.java483 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in testCaptivePortalNeverDetected_DefaultToFalse()
507 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in testMacRandomizationSettingDefaultToRandomizationNone()
532 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in testMacRandomizationSettingUpgradeToRandomizationAuto()
560 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in testMacRandomizationSettingNoUpgradeToRandomizationAutoForSuggestion()
605 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiConfigurationForBackup()
617 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiConfigurationForConfigStore()
631 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeWifiConfiguration()
697 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeDeserializeIpConfiguration()
705 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in serializeDeserializeIpConfiguration()
728 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeNetworkSelectionStatus()
[all …]
/aosp12/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
H A DWindowTracingTest.java164 "TEST_WHERE".getBytes(StandardCharsets.UTF_8))); in tracing_endsUpInFile()
166 "TEST_WM_PROTO".getBytes(StandardCharsets.UTF_8))); in tracing_endsUpInFile()
188 byte[] haystack = "hello_world".getBytes(StandardCharsets.UTF_8); in test_containsBytes()
190 "hello".getBytes(StandardCharsets.UTF_8))); in test_containsBytes()
192 "world".getBytes(StandardCharsets.UTF_8))); in test_containsBytes()
194 "world".getBytes(StandardCharsets.UTF_8))); in test_containsBytes()
196 "world_".getBytes(StandardCharsets.UTF_8))); in test_containsBytes()
198 "absent".getBytes(StandardCharsets.UTF_8))); in test_containsBytes()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/
H A DCertUtilsTest.java31 import static java.nio.charset.StandardCharsets.UTF_8;
139 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlRootNode_succeeds()
150 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_singleLevel_succeeds()
157 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_multipleLevels_succeeds()
164 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistFalse_succeedsIfNotExist()
173 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistAtLeastOne_throwsIfNotExist()
186 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistExactlyOne_throwsIfNotExist()
199 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistExactlyOne_throwsIfMultipleExist()
214 SIGNED_STR.getBytes(UTF_8)); in verifyRsaSha256Signature_succeeds()
219 byte[] modifiedBytes = SIGNED_STR.getBytes(UTF_8); in verifyRsaSha256Signature_throwsIfMismatchSignature()
[all …]
/aosp12/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
H A DNetworkListStoreDataTest.java408 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeData()
424 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeData()
548 assertEquals(new String(expectedData, StandardCharsets.UTF_8), in serializeSharedConfigurations()
549 new String(serializedData, StandardCharsets.UTF_8)); in serializeSharedConfigurations()
629 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithUnknownTag()
651 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithMismatchConfigKey()
697 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithInvalidCreatorUidResetsToSystem()
725 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithInvalidCreatorNameResetsToPackageNameForCreatorUid()
752 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithNullCreatorNameResetsToPackageNameForCreatorUid()
773 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithValidCreatorUid()
[all …]
H A DSsidSetStoreDataTest.java64 TEST_SSID_SET_XML_STRING.getBytes(StandardCharsets.UTF_8);
84 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeData()
99 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeData()
184 deserializeData(ssidSet.getBytes(StandardCharsets.UTF_8)); in parseSetWithUnknownTag()
/aosp12/packages/modules/Wifi/framework/java/android/net/wifi/hotspot2/pps/
H A DUpdateParameter.java327 if (mServerUri.getBytes(StandardCharsets.UTF_8).length > MAX_URI_BYTES) { in validate()
329 + mServerUri.getBytes(StandardCharsets.UTF_8).length); in validate()
337 if (mUsername.getBytes(StandardCharsets.UTF_8).length > MAX_USERNAME_BYTES) { in validate()
339 + mUsername.getBytes(StandardCharsets.UTF_8).length); in validate()
347 if (mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length > MAX_PASSWORD_BYTES) { in validate()
349 + mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length); in validate()
363 if (mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length > MAX_URL_BYTES) { in validate()
365 + mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length); in validate()
/aosp12/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
H A DKeySyncUtils.java54 "V1 THM_encrypted_recovery_key".getBytes(StandardCharsets.UTF_8);
56 "V1 locally_encrypted_recovery_key".getBytes(StandardCharsets.UTF_8);
58 "V1 encrypted_application_key".getBytes(StandardCharsets.UTF_8);
60 "V1 KF_claim".getBytes(StandardCharsets.UTF_8);
62 "V1 reencrypted_recovery_key".getBytes(StandardCharsets.UTF_8);
64 private static final byte[] THM_KF_HASH_PREFIX = "THM_KF_hash".getBytes(StandardCharsets.UTF_8);
/aosp12/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/storage/
H A DBubbleXmlHelperTest.kt121 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
136 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
163 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
188 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
211 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
/aosp12/frameworks/base/core/tests/coretests/src/android/graphics/
H A DFontListParserTest.java226 try (InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))) { in invalidXml_unpaired_family()
243 try (InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))) { in invalidXml_unpaired_font()
262 try (InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))) { in invalidXml_unpaired_axis()
279 try (InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))) { in invalidXml_unclosed_family()
296 try (InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))) { in invalidXml_unclosed_font()
315 try (InputStream is = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))) { in invalidXml_unclosed_axis()
361 xml.getBytes(StandardCharsets.UTF_8)); in readFamilies()
372 xml.getBytes(StandardCharsets.UTF_8)); in readFamily()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
H A DRecoverableKeyStoreDbHelperTest.java39 import static java.nio.charset.StandardCharsets.UTF_8;
48 private static final byte[] TEST_NONCE = "test-nonce".getBytes(UTF_8);
49 private static final byte[] TEST_WRAPPED_KEY = "test-wrapped-key".getBytes(UTF_8);
57 private static final byte[] TEST_PUBLIC_KEY = "test-public-key".getBytes(UTF_8);
60 private static final byte[] TEST_SERVER_PARAMS = "test-server-params".getBytes(UTF_8);
62 private static final byte[] TEST_CERT_PATH = "test-cert-path".getBytes(UTF_8);
64 private static final byte[] TEST_KEY_METADATA = "test-key-metadata".getBytes(UTF_8);
/aosp12/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/http/
H A DHttpClientTest.java26 import static java.nio.charset.StandardCharsets.UTF_8;
82 .setResponseBody(TEST_RESPONSE_BODY.getBytes(UTF_8)) in request_contentTypeXml_returnsXmlBody()
113 .setResponseBody(TEST_RESPONSE_BODY.getBytes(UTF_8)) in request_httpGetResponseBadRequest_throwsException()
144 .setResponseBody(TEST_RESPONSE_BODY.getBytes(UTF_8)) in request_contentTypeXml_returnsXmlBody_useSpecificNetwork()
184 .setResponseBody(TEST_RESPONSE_BODY.getBytes(UTF_8)) in request_postJson_doNotEscapeForwardSlash()
193 assertThat(connection.getBytesWrittenToOutputStream()).isEqualTo(postData.getBytes(UTF_8)); in request_postJson_doNotEscapeForwardSlash()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
H A DTestData.java166 return xml.getBytes(StandardCharsets.UTF_8); in getCertXmlWithSerial()
174 return THM_SIG_XML.getBytes(StandardCharsets.UTF_8); in getSigXml()
434 return str.getBytes(StandardCharsets.UTF_8); in getInsecureCertXmlBytesWithEndpoint1()
443 return str.getBytes(StandardCharsets.UTF_8); in getInsecureCertXmlBytesWithEndpoint2()
/aosp12/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
H A DDiskBasedLogger.java18 import static java.nio.charset.StandardCharsets.UTF_8;
155 outputStream.write(log.getBytes(UTF_8)); in e()
193 bufferedReader = new BufferedReader(new InputStreamReader(inputStream, UTF_8)); in clearOldLogs()
277 outputStream.write(line.getBytes(UTF_8)); in copyLogsNewerThanDate()
278 outputStream.write("\n".getBytes(UTF_8)); in copyLogsNewerThanDate()
/aosp12/packages/modules/GeoTZ/s2storage/src/test/java/com/android/timezone/location/storage/block/read/
H A DBlockDataTest.java39 byte[] tinyByteArray = "Tiny Byte Array".getBytes(StandardCharsets.UTF_8); in getSize()
55 byte[] tinyByteArray = "Tiny Byte Array".getBytes(StandardCharsets.UTF_8); in getByteBuffer()
76 byte[] tinyByteArray = "Tiny Byte Array".getBytes(StandardCharsets.UTF_8); in typedRandomAccess()
87 byte[] bytes = "Bytes".getBytes(StandardCharsets.UTF_8); in typedRandomAccess()
/aosp12/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/
H A DChunkEncryptorTest.java27 import static java.nio.charset.StandardCharsets.UTF_8;
60 private static final byte[] PLAINTEXT_BYTES = CHUNK_PLAINTEXT.getBytes(UTF_8);
61 private static final byte[] NONCE_1 = "0123456789abc".getBytes(UTF_8);
62 private static final byte[] NONCE_2 = "123456789abcd".getBytes(UTF_8);

12345678910>>...16