Home
last modified time | relevance | path

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

1234

/external/guava/guava-tests/test/com/google/common/io/
DSourceSinkFactories.java79 return new FileByteSinkFactory(initialString.getBytes(Charsets.UTF_8)); in appendingFileByteSinkFactory()
108 return factory.createSource(string.getBytes(Charsets.UTF_8)) in asCharSourceFactory()
109 .asCharSource(Charsets.UTF_8); in asCharSourceFactory()
114 return new String(factory.getExpected(data.getBytes(Charsets.UTF_8)), Charsets.UTF_8); in asCharSourceFactory()
129 return factory.createSink().asCharSink(Charsets.UTF_8);
134 return new String(factory.getSinkContents(), Charsets.UTF_8);
144 return new String(factoryExpectedForNothing, Charsets.UTF_8) + checkNotNull(data);
344 Writer writer = new OutputStreamWriter(new FileOutputStream(file), Charsets.UTF_8);
350 return Files.asCharSource(file, Charsets.UTF_8);
371 Writer writer = new OutputStreamWriter(new FileOutputStream(file), Charsets.UTF_8);
[all …]
DFilesTest.java78 assertTrue(Arrays.equals(I18N.getBytes(Charsets.UTF_8), in testToByteArray()
80 assertTrue(Arrays.equals(I18N.getBytes(Charsets.UTF_8), in testToByteArray()
168 assertEquals(I18N, Files.toString(i18nFile, Charsets.UTF_8)); in testToString()
212 Files.copy(i18nFile, Charsets.UTF_8, sb); in testCopyToAppendable()
220 assertEquals(I18N, Files.toString(temp, Charsets.UTF_8)); in testCopyFile()
227 Files.write(ASCII, temp1, Charsets.UTF_8); in testCopyEqualFiles()
233 assertEquals(ASCII, Files.toString(temp1, Charsets.UTF_8)); in testCopyEqualFiles()
238 Files.write(ASCII, temp, Charsets.UTF_8); in testCopySameFile()
244 assertEquals(ASCII, Files.toString(temp, Charsets.UTF_8)); in testCopySameFile()
249 Files.write(ASCII, temp1, Charsets.UTF_8); in testCopyIdenticalFiles()
[all …]
DTestCharSource.java19 import static com.google.common.base.Charsets.UTF_8;
35 this.byteSource = new TestByteSource(content.getBytes(UTF_8), options); in TestCharSource()
50 return new InputStreamReader(byteSource.openStream(), UTF_8); in openStream()
DTestCharSink.java19 import static com.google.common.base.Charsets.UTF_8;
40 return new String(byteSink.getBytes(), UTF_8); in getString()
56 return new FilterWriter(new OutputStreamWriter(byteSink.openStream(), UTF_8)) { in openStream()
DTestReader.java19 import static com.google.common.base.Charsets.UTF_8;
39 super(new InputStreamReader(checkNotNull(in), UTF_8)); in TestReader()
DTestWriter.java19 import static com.google.common.base.Charsets.UTF_8;
38 super(new OutputStreamWriter(checkNotNull(out), UTF_8)); in TestWriter()
DResourcesTest.java58 assertEquals(I18N, Resources.toString(resource, Charsets.UTF_8)); in testToString()
73 Resources.readLines(resource, Charsets.UTF_8)); in testReadLines()
162 String text = Resources.toString(url, Charsets.UTF_8); in testGetResource_contextClassLoader()
/external/caliper/caliper/src/test/java/com/google/caliper/bridge/
DLogMessageParserTest.java21 import static com.google.common.base.Charsets.UTF_8;
58 Resources.getResource(LogMessageParserTest.class, "jdk6-gc.txt"), UTF_8); in gcPatten_jdk6()
66 Resources.getResource(LogMessageParserTest.class, "jdk7-gc.txt"), UTF_8); in gcPatten_jdk7()
87 Resources.getResource(LogMessageParserTest.class, "jdk6-compilation.txt"), UTF_8); in jitPattern_jdk6()
95 Resources.getResource(LogMessageParserTest.class, "jdk7-compilation.txt"), UTF_8); in jitPattern_jdk7()
103 Resources.getResource(LogMessageParserTest.class, "jdk6-flags.txt"), UTF_8); in vmOptionPattern_jdk6()
111 Resources.getResource(LogMessageParserTest.class, "jdk7-flags.txt"), UTF_8); in vmOptionPattern_jdk7()
/external/guava/guava-tests/test/com/google/common/hash/
DCrc32cHashFunctionTest.java17 import static com.google.common.base.Charsets.UTF_8;
83 assertCrc(0x22620404, "The quick brown fox jumps over the lazy dog".getBytes(UTF_8)); in testSomeOtherKnownValues()
84 assertCrc(0xE3069283, "123456789".getBytes(UTF_8)); in testSomeOtherKnownValues()
85 assertCrc(0xf3dbd4fe, "1234567890".getBytes(UTF_8)); in testSomeOtherKnownValues()
86 assertCrc(0xBFE92A83, "23456789".getBytes(UTF_8)); in testSomeOtherKnownValues()
DSipHashFunctionTest.java17 import static com.google.common.base.Charsets.UTF_8;
165 assertEquals(expected, SIP_WITH_KEY.hashString(input, UTF_8).asLong()); in assertSip()
166 assertEquals(expected, SIP_WITH_KEY.newHasher().putString(input, UTF_8).hash().asLong()); in assertSip()
167 assertEquals(expected, SIP_WITHOUT_KEY.hashString(input, UTF_8).asLong()); in assertSip()
168 assertEquals(expected, SIP_WITHOUT_KEY.newHasher().putString(input, UTF_8).hash().asLong()); in assertSip()
DMessageDigestHashFunctionTest.java65 sha1.putString("The quick brown fox jumps over the lazy dog", Charsets.UTF_8) in testPutAfterHash()
79 sha1.putString("The quick brown fox jumps over the lazy dog", Charsets.UTF_8) in testHashTwice()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DResponseBody.java28 import static com.squareup.okhttp.internal.Util.UTF_8;
88 return contentType != null ? contentType.charset(UTF_8) : UTF_8; in charset()
100 Charset charset = Util.UTF_8; in create()
104 charset = Util.UTF_8; in create()
DRequestBody.java47 Charset charset = Util.UTF_8; in create()
51 charset = Util.UTF_8; in create()
/external/okhttp/okio/okio/src/test/java/okio/
DGzipSourceTest.java22 import static okio.Util.UTF_8;
55 gzipped.write("blubber".getBytes(UTF_8), 0, 7); in gunzip_withExtra()
64 gzipped.write("foo.txt".getBytes(UTF_8), 0, 7); in gunzip_withName()
74 gzipped.write("rubbish".getBytes(UTF_8), 0, 7); in gunzip_withComment()
89 gzipped.write("blubber".getBytes(UTF_8), 0, 7); in gunzip_withAll()
90 gzipped.write("foo.txt".getBytes(UTF_8), 0, 7); in gunzip_withAll()
92 gzipped.write("rubbish".getBytes(UTF_8), 0, 7); in gunzip_withAll()
DByteStringTest.java38 byte[] bytes = "Hello, World!".getBytes(Util.UTF_8); in ofCopyRange()
74 assertByteArraysEquals(byteString.toByteArray(), bronzeHorseman.getBytes(Util.UTF_8)); in utf8()
75 assertTrue(byteString.equals(ByteString.of(bronzeHorseman.getBytes(Util.UTF_8)))); in utf8()
104 InputStream in = new ByteArrayInputStream("abc".getBytes(Util.UTF_8)); in read()
111 InputStream in = new ByteArrayInputStream("ABC".getBytes(Util.UTF_8)); in readAndToLowercase()
131 InputStream in = new ByteArrayInputStream("abc".getBytes(Util.UTF_8)); in readAndToUppercase()
/external/guava/guava-gwt/src-super/java/nio/charset/
DCharset.java29 private static final Charset UTF_8 = new Charset("UTF-8") {}; field in Charset
34 AVAILABLE_CHARSETS.put(UTF_8.name(), UTF_8); in UTF_8.name()
/external/caliper/caliper/src/test/java/com/google/caliper/config/
DLoggingConfigLoaderTest.java17 import static com.google.common.base.Charsets.UTF_8;
81 assertEquals(UTF_8.name(), fileHandler.getEncoding()); in testLoadDefaultLogConfiguration()
87 assertTrue(Files.toString(logFile, UTF_8).contains("some message")); in testLoadDefaultLogConfiguration()
/external/guava/guava-tests/test/com/google/common/net/
DMediaTypeTest.java20 import static com.google.common.base.Charsets.UTF_8;
80 assertEquals(Optional.of(UTF_8), charset); in testConstants_charset()
230 MediaType.parse("text/plain").withCharset(UTF_8));
232 MediaType.parse("text/plain; charset=utf-16").withCharset(UTF_8));
337 assertEquals(Optional.of(UTF_8),
380 MediaType.create("text", "plain").withCharset(UTF_8),
411 .addEqualityGroup(MediaType.create("text", "plain").withCharset(UTF_8))
/external/protobuf/java/src/test/java/com/google/protobuf/
DBoundedByteStringTest.java59 LiteralByteString unicode = new LiteralByteString(testString.getBytes(UTF_8)); in testToString()
64 String roundTripString = chopped.toString(UTF_8); in testToString()
/external/guava/guava-gwt/test-super/com/google/common/net/super/com/google/common/net/
DMediaTypeTest.java19 import static com.google.common.base.Charsets.UTF_8;
170 MediaType.parse("text/plain").withCharset(UTF_8)); in testWithCharset()
172 MediaType.parse("text/plain; charset=utf-16").withCharset(UTF_8)); in testWithCharset()
277 assertEquals(Optional.of(UTF_8), in testGetCharset()
315 MediaType.create("text", "plain").withCharset(UTF_8), in testEquals()
/external/caliper/examples/src/main/java/examples/
DUtf8Benchmark.java31 static final Charset UTF_8 = Charset.forName("UTF-8"); field in Utf8Benchmark
129 byte[] bytes = string.getBytes(UTF_8); in getBytes()
/external/okhttp/okhttp-apache/src/test/java/com/squareup/okhttp/apache/
DOkApacheClientTest.java28 import static com.squareup.okhttp.internal.Util.UTF_8;
62 String actual = EntityUtils.toString(response.getEntity(), UTF_8); in redirect()
96 byte[] body = "Hello, world!".getBytes(UTF_8); in postByteEntity()
109 byte[] body = "Hello, world!".getBytes(UTF_8); in postInputStreamEntity()
260 assertEquals(text, EntityUtils.toString(entity, UTF_8)); in jsonTransparentGzipResponse()
/external/sl4a/Common/src/org/apache/commons/codec/binary/
DStringUtils.java129 return StringUtils.getBytesUnchecked(string, CharEncoding.UTF_8); in getBytesUtf8()
276 return StringUtils.newString(bytes, CharEncoding.UTF_8); in newStringUtf8()
/external/owasp/sanitizer/src/tests/org/owasp/html/
DHtmlLexerTest.java49 Charsets.UTF_8); in testHtmlLexer()
56 Charsets.UTF_8); in testHtmlLexer()
/external/caliper/caliper/src/test/resources/com/google/caliper/bridge/
Djdk7-compilation.txt2 106 2 b sun.nio.cs.UTF_8$Decoder::decode (640 bytes)
7 142 6 b sun.nio.cs.UTF_8$Encoder::encode (361 bytes)
8 149 2 % b sun.nio.cs.UTF_8$Encoder::encode @ 20 (361 bytes)
9 162 2 sun.nio.cs.UTF_8$Decoder::decode (640 bytes) made not entrant
10 165 7 b sun.nio.cs.UTF_8$Decoder::decode (640 bytes)
168 1701 2 sun.nio.cs.UTF_8$Decoder::decode (640 bytes) made zombie
177 1841 166 b sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (543 bytes)
230 17524 207 b sun.nio.cs.UTF_8$Encoder::encodeArrayLoop (489 bytes)
245 17561 222 b sun.nio.cs.UTF_8$Encoder::encodeLoop (28 bytes)
254 17656 7 sun.nio.cs.UTF_8$Decoder::decode (640 bytes) made not entrant
[all …]

1234