Home
last modified time | relevance | path

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

12

/libcore/benchmarks/src/benchmarks/regression/
DCharsetUtf8Benchmark.java55 new String(ASCII, StandardCharsets.UTF_8); in time_ascii()
59 new String(BMP2, StandardCharsets.UTF_8); in time_bmp2()
63 new String(BMP3, StandardCharsets.UTF_8); in time_bmp3()
67 new String(SUPPLEMENTARY, StandardCharsets.UTF_8); in time_supplementary()
DStringToBytesBenchmark.java62 string.value.getBytes(StandardCharsets.UTF_8); in timeGetBytesUtf8()
/libcore/luni/src/test/java/libcore/java/net/
DFtpURLConnectionTest.java53 import static java.nio.charset.StandardCharsets.UTF_8;
89 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testInputUrl()
124 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testOutputUrl()
126 byte[] newFileContents = "contents of brand new file".getBytes(UTF_8); in testOutputUrl()
140 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testConnectOverProxy_noProxy()
176 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testConnectOverProxy_explicit_http_uses_direct_connection()
196 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testConnectOverProxy_implicit_http_fails()
224 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testInputUrlWithSpaces()
239 byte[] fileContents = "abcdef 1234567890".getBytes(UTF_8); in testInputUrlWithSpacesViaProxySelector()
298 fail("Expected " + new String(expectedContents, UTF_8) + ", but got " in assertContents()
[all …]
/libcore/luni/src/test/java/libcore/android/system/
DUnixSocketAddressTest.java32 byte[] abstractNameBytes = path.getBytes(StandardCharsets.UTF_8); in testFilesystemSunPath()
47 byte[] abstractNameBytes = abstractName.getBytes(StandardCharsets.UTF_8); in testAbstractSunPath()
DOsTest.java200 String s = new String(request, StandardCharsets.UTF_8); in checkUnixDomainSocket()
201 byte[] response = s.toUpperCase(Locale.ROOT).getBytes(StandardCharsets.UTF_8); in checkUnixDomainSocket()
219 byte[] request = string.getBytes(StandardCharsets.UTF_8); in checkUnixDomainSocket()
225 assertEquals(string.toUpperCase(Locale.ROOT), new String(response, StandardCharsets.UTF_8)); in checkUnixDomainSocket()
720 new String(requestBuf, 0, len, StandardCharsets.UTF_8); in createVmSocketEchoServer()
722 request.toUpperCase(Locale.ROOT).getBytes(StandardCharsets.UTF_8); in createVmSocketEchoServer()
753 final byte[] requestBuf = request.getBytes(StandardCharsets.UTF_8);
762 final String response = new String(responseBuf, StandardCharsets.UTF_8);
805 StandardCharsets.UTF_8);
1226 final byte[] VALUE_CAKE = "cake cake cake".getBytes(StandardCharsets.UTF_8);
[all …]
/libcore/ojluni/src/main/java/java/util/zip/
DZipEntry.java128 if (name.getBytes(StandardCharsets.UTF_8).length > 0xffff) { in ZipEntry()
130 name.getBytes(StandardCharsets.UTF_8).length); in ZipEntry()
581 if (comment != null && comment.getBytes(StandardCharsets.UTF_8).length > 0xffff) { in setComment()
583 comment.getBytes(StandardCharsets.UTF_8).length); in setComment()
DZipCoder.java110 utf8 = new ZipCoder(StandardCharsets.UTF_8); in getBytesUTF8()
119 utf8 = new ZipCoder(StandardCharsets.UTF_8); in toStringUTF8()
135 this.isUTF8 = cs.name().equals(StandardCharsets.UTF_8.name()); in ZipCoder()
DZipInputStream.java81 this(in, StandardCharsets.UTF_8); in ZipInputStream()
/libcore/luni/src/main/java/android/system/
DUnixSocketAddress.java76 byte[] nameBytes = name.getBytes(StandardCharsets.UTF_8); in createAbstract()
97 byte[] pathNameBytes = pathName.getBytes(StandardCharsets.UTF_8); in createFileSystem()
/libcore/luni/src/test/java/libcore/javax/crypto/
DMacTest.java19 import static java.nio.charset.StandardCharsets.UTF_8;
121 byte[] salt = "saltsalt".getBytes(UTF_8); in test_PBEWITHHMACSHA_Variants()
DSecretKeyFactoryTest.java19 import static java.nio.charset.StandardCharsets.UTF_8;
176 byte[] salt = "salt".getBytes(UTF_8); in test_PBKDF2_b8312059()
/libcore/ojluni/src/main/java/java/nio/charset/
DStandardCharsets.java52 public static final Charset UTF_8 = Charset.forName("UTF-8"); field in StandardCharsets
/libcore/support/src/test/java/libcore/testing/io/
DTestIoUtils.java35 return new String(Files.readAllBytes(Paths.get(absolutePath)), StandardCharsets.UTF_8); in readFileAsString()
/libcore/metrictests/memory/apps/src/libcore/heapdumper/
DPssInstrumentation.java45 Charset cs = StandardCharsets.UTF_8; in takeMeasurement()
/libcore/luni/src/main/java/org/xml/sax/helpers/
DXMLReaderFactory.java133 reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); in createXMLReader()
/libcore/luni/src/test/java/libcore/libcore/util/
DHexEncodingTest.java57 { "avocados".getBytes(StandardCharsets.UTF_8), "61766F6361646F73" }, in testEncodeBytes()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DPrintStreamTest.java103 assertFileContents(UNICODE_STRING.getBytes(StandardCharsets.UTF_8), testFile); in test_Constructor_Ljava_lang_String_Ljava_lang_String()
160 assertByteArraysEqual(UNICODE_STRING.getBytes(StandardCharsets.UTF_8), in test_ConstructorLjava_io_OutputStreamZLjava_lang_String()
686 byte[] bytes = "Line without a newline".getBytes(StandardCharsets.UTF_8); in test_autoFlush_flushesEverything()
704 byte[] bytes = "Line without a newline".getBytes(StandardCharsets.UTF_8); in test_noAutoFlush()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSNIHostName.java171 CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder() in SNIHostName()
/libcore/ojluni/src/main/java/java/nio/file/
DFiles.java2816 return newBufferedReader(path, StandardCharsets.UTF_8);
2896 return newBufferedWriter(path, StandardCharsets.UTF_8, options);
3242 return readAllLines(path, StandardCharsets.UTF_8);
3397 return write(path, lines, StandardCharsets.UTF_8, options);
3785 return lines(path, StandardCharsets.UTF_8);
/libcore/luni/src/test/java/libcore/java/util/zip/
DGZIPInputStreamTest.java148 assertEquals("Hello World", new String(unzipped, StandardCharsets.UTF_8)); in testTrailingHeaderAndPartialMember()
/libcore/luni/src/test/java/libcore/dalvik/system/
DBaseDexClassLoaderTest.java295 contents.add(new String(bytes, StandardCharsets.UTF_8)); in readResources()
309 return new String(contents, StandardCharsets.UTF_8); in readResource()
/libcore/luni/src/test/java/libcore/java/security/cert/
DX509CRLTest.java19 import static java.nio.charset.StandardCharsets.UTF_8;
149 final BufferedReader buf = new BufferedReader(new InputStreamReader(ris, UTF_8)); in getCrlDates()
/libcore/luni/src/test/java/libcore/xml/
DExpatSaxParserTest.java119 Encoding.UTF_8, handler); in testSax()
727 UTF_8("UTF-8"), enumConstant
/libcore/luni/src/test/java/libcore/java/nio/charset/
DCharsetEncoderTest.java222 CharsetEncoder encoder = StandardCharsets.UTF_8.newEncoder();
/libcore/luni/src/main/java/libcore/io/
DIoUtils.java301 return new FileReader(absolutePath).readFully().toString(StandardCharsets.UTF_8); in readFileAsString()

12