Home
last modified time | relevance | path

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

12345678910

/frameworks/base/core/tests/coretests/src/android/net/
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()
/frameworks/base/core/tests/coretests/src/android/os/
DFileBridgeTest.java90 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync()
92 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync()
97 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync()
100 assertContents("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync()
105 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
107 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
109 assertContents("meowcake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
121 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
124 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
128 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
/frameworks/base/tools/powermodel/test/com/android/powermodel/
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 …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/cdc/
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()
137 (SMALL_CHUNK + CHUNK_BOUNDARY + CHUNK_2 + CHUNK_BOUNDARY + CHUNK_3).getBytes(UTF_8); in chunkify_withSmallChunks_combinesChunksUntilMinSize()
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()
[all …]
DRabinFingerprint64Test.java21 import static java.nio.charset.StandardCharsets.UTF_8;
104 return sb.toString().getBytes(UTF_8); in getBytes()
130 return computeFingerprintAtPosition(s.getBytes(UTF_8), WINDOW_SIZE - 1); in computeFingerprintOf()
/frameworks/base/keystore/java/android/security/keystore/
DAttestationUtils.java179 Build.getSerial().getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
187 imei.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
196 meid.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
204 brand.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
206 Build.DEVICE.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
208 Build.PRODUCT.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
210 Build.MANUFACTURER.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
212 Build.MODEL.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
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()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/
DCertUtilsTest.java31 import static java.nio.charset.StandardCharsets.UTF_8;
124 assertThat(CertUtils.decodeBase64("VEVTVA==")).isEqualTo("TEST".getBytes(UTF_8)); in decodeBase64_succeeds()
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()
[all …]
/frameworks/opt/gamesdk/src/tuningfork/tools/validation/src/test/java/com/google/tuningfork/validation/
DTestdataHelper.java20 import static java.nio.charset.StandardCharsets.UTF_8;
44 Files.asCharSink(file, UTF_8).write(content); in createFile()
50 String content = new String(byteContent, UTF_8); in getFile()
53 Files.asCharSink(file, UTF_8).write(content); in getFile()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DNetworkListStoreDataTest.java215 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeData()
231 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeData()
283 return (openNetworkXml + eapNetworkXml).getBytes(StandardCharsets.UTF_8); in getTestNetworksXmlBytes()
417 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithUnknownTag()
435 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithMismatchConfigKey()
456 deserializeData(xmlString.getBytes(StandardCharsets.UTF_8)); in parseNetworkListWithOneNetworkIllegalArgException()
480 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithInvalidCreatorUidResetsToSystem()
508 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithInvalidCreatorNameResetsToPackageNameForCreatorUid()
535 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithNullCreatorNameResetsToPackageNameForCreatorUid()
556 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithValidCreatorUid()
DSsidSetStoreDataTest.java62 TEST_SSID_SET_XML_STRING.getBytes(StandardCharsets.UTF_8);
82 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeData()
97 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeData()
180 deserializeData(ssidSet.getBytes(StandardCharsets.UTF_8)); in parseSetWithUnknownTag()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/test/java/com/google/protobuf/
DBoundedByteStringTest.java64 ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8)); in testToString()
69 String roundTripString = chopped.toString(UTF_8); in testToString()
77 ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8)); in testCharsetToString()
82 String roundTripString = chopped.toString(Internal.UTF_8); in testCharsetToString()
DRopeByteStringTest.java112 String roundTripString = unicode.toString(UTF_8); in testToString()
138 String roundTripString = unicode.toString(Internal.UTF_8); in testCharsetToString()
152 ByteString.EMPTY.toString(Internal.UTF_8), ropeByteString.toString(Internal.UTF_8)); in testToString_returnsCanonicalEmptyString()
/frameworks/base/wifi/java/android/net/wifi/hotspot2/pps/
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()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
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);
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
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);
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
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()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DXmlUtilTest.java414 deserializeWifiEnterpriseConfig(xmlString.getBytes(StandardCharsets.UTF_8)); in testWifiEnterpriseConfigSerializeDeserializeThrowsIllegalArgException()
445 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in testMacRandomizationSettingDefaultToRandomizationNone()
462 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiConfigurationForBackup()
474 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiConfigurationForConfigStore()
486 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeWifiConfiguration()
543 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeDeserializeIpConfiguration()
551 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in serializeDeserializeIpConfiguration()
563 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeNetworkSelectionStatus()
574 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeNetworkSelectionStatus()
594 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiEnterpriseConfig()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/
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);
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/
DSingleStreamDiffScriptWriter.java33 private static final Charset UTF_8 = Charset.forName("UTF-8"); field in SingleStreamDiffScriptWriter
91 mOutputStream.write(Integer.toString(mBufferSize).getBytes(UTF_8)); in writeByteBuffer()
106 .getBytes(UTF_8)); in writeReusableChunk()
/frameworks/opt/telephony/src/java/com/google/android/mms/pdu/
DCharacterSets.java43 public static final int UTF_8 = 0x6A; field in CharacterSets
51 public static final int DEFAULT_CHARSET = UTF_8;
69 UTF_8,
/frameworks/multidex/library/test/src/androidx/multidex/
DZipEntryReader.java32 static final Charset UTF_8 = Charset.forName("UTF-8"); field in ZipEntryReader
83 String name = new String(nameBytes, 0, nameBytes.length, UTF_8); in readEntry()
98 entry.setComment(new String(commentBytes, 0, commentBytes.length, UTF_8)); in readEntry()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
DSliceFullAccessListTest.java89 out.setOutput(output, Encoding.UTF_8.name()); in testSerialization()
93 assertEquals(TEST_XML, output.toString(Encoding.UTF_8.name())); in testSerialization()
100 parser.setInput(input, Encoding.UTF_8.name()); in testDeSerialization()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DPersistentDataStoreTest.java76 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testLoadingBrightnessConfigurations()
109 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testBrightnessConfigWithInvalidCurveIsIgnored()
128 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testBrightnessConfigWithInvalidFloatsIsIgnored()
140 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testEmptyBrightnessConfigurationsDoesntCrash()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/
DOsuProviderInfoTestUtil.java109 writeByteArrayWithLength(out, TEST_SERVER_URI.getBytes(StandardCharsets.UTF_8)); in getTestPayload()
122 writeByteArrayWithLength(out, TEST_NAI.getBytes(StandardCharsets.UTF_8)); in getTestPayload()
153 out.write(value.getText().getBytes(StandardCharsets.UTF_8)); in getI18NameData()

12345678910