/external/okhttp/okio/okio/src/test/java/okio/ |
D | ByteStringTest.java | 73 ByteString byteString = ByteString.encodeUtf8(bronzeHorseman); in utf8() 81 ByteString.encodeUtf8("Hello, world!").md5().hex()); in md5() 83 ByteString.encodeUtf8("One Two Three").md5().hex()); in md5() 85 ByteString.encodeUtf8(bronzeHorseman).md5().hex()); in md5() 90 ByteString.encodeUtf8("Hello, world!").sha256().hex()); in sha256() 92 ByteString.encodeUtf8("One Two Three").sha256().hex()); in sha256() 94 ByteString.encodeUtf8(bronzeHorseman).sha256().hex()); in sha256() 112 assertEquals(ByteString.encodeUtf8("ab"), ByteString.read(in, 2).toAsciiLowercase()); in readAndToLowercase() 113 assertEquals(ByteString.encodeUtf8("c"), ByteString.read(in, 1).toAsciiLowercase()); in readAndToLowercase() 118 ByteString s = ByteString.encodeUtf8("a1_+"); in toAsciiLowerCaseNoUppercase() [all …]
|
D | BufferedSourceTest.java | 475 assertEquals(-1, source.indexOf(ByteString.encodeUtf8("flop"))); in indexOfByteString() 478 assertEquals(5, source.indexOf(ByteString.encodeUtf8("flop"))); in indexOfByteString() 483 assertEquals(3, source.indexOf(ByteString.encodeUtf8("hi hi hey"))); in indexOfByteString() 487 assertEquals(-1, source.indexOf(ByteString.encodeUtf8("flop"), 1)); in indexOfByteStringWithOffset() 490 assertEquals(10, source.indexOf(ByteString.encodeUtf8("flop"), 1)); in indexOfByteStringWithOffset() 495 assertEquals(6, source.indexOf(ByteString.encodeUtf8("hi hi hey"), 1)); in indexOfByteStringWithOffset() 506 source.indexOf(ByteString.encodeUtf8("hi"), -1); in indexOfByteStringInvalidArgumentsThrows() 515 assertEquals(0, source.indexOfElement(ByteString.encodeUtf8("DEFGaHIJK"))); in indexOfElement() 516 assertEquals(1, source.indexOfElement(ByteString.encodeUtf8("DEFGHIJKb"))); in indexOfElement() 517 assertEquals(Segment.SIZE + 1, source.indexOfElement(ByteString.encodeUtf8("cDEFGHIJK"))); in indexOfElement() [all …]
|
/external/okio/okio/src/commonTest/kotlin/okio/ |
D | AbstractBufferedSourceTest.kt | 20 import okio.ByteString.Companion.encodeUtf8 633 assertEquals(-1, source.indexOf("flop".encodeUtf8())) in indexOfByteString() 637 assertEquals(5, source.indexOf("flop".encodeUtf8())) in indexOfByteString() 643 assertEquals(3, source.indexOf("hi hi hey".encodeUtf8())) in indexOfByteString() 652 source.indexOf("aabc".encodeUtf8(), (Segment.SIZE - 4).toLong()) in indexOfByteStringAtSegmentBoundary() 656 source.indexOf("aabc".encodeUtf8(), (Segment.SIZE - 3).toLong()) in indexOfByteStringAtSegmentBoundary() 660 source.indexOf("abcd".encodeUtf8(), (Segment.SIZE - 2).toLong()) in indexOfByteStringAtSegmentBoundary() 664 source.indexOf("abc".encodeUtf8(), (Segment.SIZE - 2).toLong()) in indexOfByteStringAtSegmentBoundary() 668 source.indexOf("abc".encodeUtf8(), (Segment.SIZE - 2).toLong()) in indexOfByteStringAtSegmentBoundary() 672 source.indexOf("ab".encodeUtf8(), (Segment.SIZE - 2).toLong()) in indexOfByteStringAtSegmentBoundary() [all …]
|
D | ByteStringFactory.kt | 20 import okio.ByteString.Companion.encodeUtf8 26 fun encodeUtf8(s: String): ByteString in decodeHex() method 31 override fun encodeUtf8(s: String) = s.encodeUtf8() in decodeHex() method 36 override fun encodeUtf8(s: String) = Buffer().apply { writeUtf8(s) }.snapshot() in decodeHex() method 41 override fun encodeUtf8(s: String) = makeSegments(s.encodeUtf8()) in decodeHex() method 49 override fun encodeUtf8(s: String) = in decodeHex() method
|
D | ByteStringTest.kt | 21 import okio.ByteString.Companion.encodeUtf8 42 val actual = factory.encodeUtf8("abc") in get() 209 val byteString = factory.encodeUtf8(bronzeHorseman) in utf8() 229 val s = factory.encodeUtf8("a1_+") in toAsciiLowerCaseNoUppercase() 237 assertEquals("ab".encodeUtf8(), factory.encodeUtf8("AB").toAsciiLowercase()) in toAsciiAllUppercase() 241 assertEquals("abcd".encodeUtf8(), factory.encodeUtf8("abCD").toAsciiLowercase()) in toAsciiStartsLowercaseEndsUppercase() 245 assertEquals("ABCD".encodeUtf8(), factory.encodeUtf8("ABcd").toAsciiUppercase()) in toAsciiStartsUppercaseEndsLowercase() 249 val byteString = factory.encodeUtf8("Hello, World!") in substring() 252 assertEquals(byteString.substring(0, 5), "Hello".encodeUtf8()) in substring() 253 assertEquals(byteString.substring(7), "World!".encodeUtf8()) in substring() [all …]
|
D | HashingTest.kt | 19 import okio.ByteString.Companion.encodeUtf8 25 assertEquals(MD5_abc, "abc".encodeUtf8().md5()) in byteStringMd5() 29 assertEquals(SHA1_abc, "abc".encodeUtf8().sha1()) in byteStringSha1() 33 assertEquals(SHA256_abc, "abc".encodeUtf8().sha256()) in byteStringSha256() 37 assertEquals(SHA512_abc, "abc".encodeUtf8().sha512()) in byteStringSha512() 41 assertEquals(HMAC_SHA1_abc, "abc".encodeUtf8().hmacSha1(HMAC_KEY)) in byteStringHmacSha1() 45 assertEquals(HMAC_SHA256_abc, "abc".encodeUtf8().hmacSha256(HMAC_KEY)) in byteStringHmacSha256() 49 assertEquals(HMAC_SHA512_abc, "abc".encodeUtf8().hmacSha512(HMAC_KEY)) in byteStringHmacSha512()
|
D | BufferCommonTest.kt | 18 import okio.ByteString.Companion.encodeUtf8 26 source.write("party".encodeUtf8()) in copyToBuffer() 36 source.write("party".encodeUtf8()) in copyToBufferWithOffset() 46 source.write("party".encodeUtf8()) in copyToBufferWithByteCount() 56 source.write("party".encodeUtf8()) in copyToBufferWithOffsetAndByteCount() 82 val buffer = Buffer().apply { write("Kevin".encodeUtf8()) } in testHash()
|
D | AbstractBufferedSinkTest.kt | 20 import okio.ByteString.Companion.encodeUtf8 121 sink.write("təˈranəˌsôr".encodeUtf8()) in writeByteString() 127 sink.write("təˈranəˌsôr".encodeUtf8(), 5, 5) in writeByteStringOffset() 133 sink.write(Buffer().write("təˈranəˌsôr".encodeUtf8()).snapshot()) in writeSegmentedByteString() 139 sink.write(Buffer().write("təˈranəˌsôr".encodeUtf8()).snapshot(), 5, 5) in writeSegmentedByteStringOffset()
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/framed/ |
D | Header.java | 8 public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status"); 9 public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method"); 10 public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path"); 11 public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme"); 12 public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority"); // HTTP/2 13 public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host"); // spdy/3 14 public static final ByteString VERSION = ByteString.encodeUtf8(":version"); // spdy/3 24 this(ByteString.encodeUtf8(name), ByteString.encodeUtf8(value)); in Header() 28 this(name, ByteString.encodeUtf8(value)); in Header()
|
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/framed/ |
D | Header.java | 10 public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status"); 11 public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method"); 12 public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path"); 13 public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme"); 14 public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority"); // HTTP/2 15 public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host"); // spdy/3 16 public static final ByteString VERSION = ByteString.encodeUtf8(":version"); // spdy/3 26 this(ByteString.encodeUtf8(name), ByteString.encodeUtf8(value)); in Header() 30 this(name, ByteString.encodeUtf8(value)); in Header()
|
/external/grpc-grpc-java/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/framed/ |
D | Header.java | 12 public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status"); 13 public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method"); 14 public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path"); 15 public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme"); 16 public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority"); // HTTP/2 17 public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host"); // spdy/3 18 public static final ByteString VERSION = ByteString.encodeUtf8(":version"); // spdy/3 28 this(ByteString.encodeUtf8(name), ByteString.encodeUtf8(value)); in Header() 32 this(name, ByteString.encodeUtf8(value)); in Header()
|
/external/okio/okio/src/jvmTest/java/okio/ |
D | BufferedSourceTest.java | 777 assertEquals(-1, source.indexOf(ByteString.encodeUtf8("flop"))); in indexOfByteString() 781 assertEquals(5, source.indexOf(ByteString.encodeUtf8("flop"))); in indexOfByteString() 787 assertEquals(3, source.indexOf(ByteString.encodeUtf8("hi hi hey"))); in indexOfByteString() 794 assertEquals(SEGMENT_SIZE - 3, source.indexOf(ByteString.encodeUtf8("aabc"), SEGMENT_SIZE - 4)); in indexOfByteStringAtSegmentBoundary() 795 assertEquals(SEGMENT_SIZE - 3, source.indexOf(ByteString.encodeUtf8("aabc"), SEGMENT_SIZE - 3)); in indexOfByteStringAtSegmentBoundary() 796 assertEquals(SEGMENT_SIZE - 2, source.indexOf(ByteString.encodeUtf8("abcd"), SEGMENT_SIZE - 2)); in indexOfByteStringAtSegmentBoundary() 797 assertEquals(SEGMENT_SIZE - 2, source.indexOf(ByteString.encodeUtf8("abc"), SEGMENT_SIZE - 2)); in indexOfByteStringAtSegmentBoundary() 798 assertEquals(SEGMENT_SIZE - 2, source.indexOf(ByteString.encodeUtf8("abc"), SEGMENT_SIZE - 2)); in indexOfByteStringAtSegmentBoundary() 799 assertEquals(SEGMENT_SIZE - 2, source.indexOf(ByteString.encodeUtf8("ab"), SEGMENT_SIZE - 2)); in indexOfByteStringAtSegmentBoundary() 800 assertEquals(SEGMENT_SIZE - 2, source.indexOf(ByteString.encodeUtf8("a"), SEGMENT_SIZE - 2)); in indexOfByteStringAtSegmentBoundary() [all …]
|
D | ByteStringJavaTest.java | 52 @Override public ByteString encodeUtf8(String s) { 53 return ByteString.encodeUtf8(s); 64 @Override public ByteString encodeUtf8(String s) { 76 @Override public ByteString encodeUtf8(String s) { 77 return makeSegments(ByteString.encodeUtf8(s)); 82 ByteString encodeUtf8(String s); in encodeUtf8() method 279 ByteString byteString = factory.encodeUtf8(bronzeHorseman); in utf8() 367 assertEquals(ByteString.encodeUtf8("ab"), ByteString.read(in, 2).toAsciiLowercase()); in readAndToLowercase() 368 assertEquals(ByteString.encodeUtf8("c"), ByteString.read(in, 1).toAsciiLowercase()); in readAndToLowercase() 373 ByteString s = factory.encodeUtf8("a1_+"); in toAsciiLowerCaseNoUppercase() [all …]
|
D | BufferedSinkTest.java | 169 sink.write(ByteString.encodeUtf8("təˈranəˌsôr")); in writeByteString() 175 sink.write(ByteString.encodeUtf8("təˈranəˌsôr"), 5, 5); in writeByteStringOffset() 181 sink.write(new Buffer().write(ByteString.encodeUtf8("təˈranəˌsôr")).snapshot()); in writeSegmentedByteString() 187 sink.write(new Buffer().write(ByteString.encodeUtf8("təˈranəˌsôr")).snapshot(), 5, 5); in writeSegmentedByteStringOffset() 220 assertEquals(ByteString.encodeUtf8("ranə"), data.readByteString()); in writeUtf8SubstringWithCharset()
|
D | InflaterSourceTest.java | 95 deflate(ByteString.encodeUtf8(original)); in inflateWellCompressed() 113 deflate(ByteString.encodeUtf8("God help us, we're in the hands of engineers.")); in inflateIntoNonemptySink()
|
/external/okio/okio/src/jvmTest/kotlin/okio/ |
D | ByteStringKotlinTest.kt | 19 import okio.ByteString.Companion.encodeUtf8 48 val expected = "a\uD83C\uDF69c".encodeUtf8() in stringEncodeByteStringDefaultCharset() 60 val byteString = "abcdef".encodeUtf8() in substring() 61 assertEquals(byteString.substring(), "abcdef".encodeUtf8()) in substring() 62 assertEquals(byteString.substring(endIndex = 3), "abc".encodeUtf8()) in substring() 63 assertEquals(byteString.substring(beginIndex = 3), "def".encodeUtf8()) in substring() 64 assertEquals(byteString.substring(beginIndex = 1, endIndex = 5), "bcde".encodeUtf8()) in substring()
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/ |
D | Http2xStream.java | 53 private static final ByteString CONNECTION = ByteString.encodeUtf8("connection"); 54 private static final ByteString HOST = ByteString.encodeUtf8("host"); 55 private static final ByteString KEEP_ALIVE = ByteString.encodeUtf8("keep-alive"); 56 private static final ByteString PROXY_CONNECTION = ByteString.encodeUtf8("proxy-connection"); 57 private static final ByteString TRANSFER_ENCODING = ByteString.encodeUtf8("transfer-encoding"); 58 private static final ByteString TE = ByteString.encodeUtf8("te"); 59 private static final ByteString ENCODING = ByteString.encodeUtf8("encoding"); 60 private static final ByteString UPGRADE = ByteString.encodeUtf8("upgrade"); 171 ByteString name = ByteString.encodeUtf8(headers.name(i).toLowerCase(Locale.US)); in spdy3HeadersList() 209 ByteString name = ByteString.encodeUtf8(headers.name(i).toLowerCase(Locale.US)); in http2HeadersList()
|
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/http/ |
D | Http2xStream.java | 55 private static final ByteString CONNECTION = ByteString.encodeUtf8("connection"); 56 private static final ByteString HOST = ByteString.encodeUtf8("host"); 57 private static final ByteString KEEP_ALIVE = ByteString.encodeUtf8("keep-alive"); 58 private static final ByteString PROXY_CONNECTION = ByteString.encodeUtf8("proxy-connection"); 59 private static final ByteString TRANSFER_ENCODING = ByteString.encodeUtf8("transfer-encoding"); 60 private static final ByteString TE = ByteString.encodeUtf8("te"); 61 private static final ByteString ENCODING = ByteString.encodeUtf8("encoding"); 62 private static final ByteString UPGRADE = ByteString.encodeUtf8("upgrade"); 173 ByteString name = ByteString.encodeUtf8(headers.name(i).toLowerCase(Locale.US)); in spdy3HeadersList() 211 ByteString name = ByteString.encodeUtf8(headers.name(i).toLowerCase(Locale.US)); in http2HeadersList()
|
/external/okio/samples/src/jvmMain/kotlin/okio/samples/ |
D | ExploreCharsets.kt | 18 import okio.ByteString.Companion.encodeUtf8 28 println(" UTF-8 bytes: " + s.encodeUtf8().hex()) in dumpStringData()
|
/external/okio/okio/src/commonMain/kotlin/okio/ |
D | -Base64.kt | 21 import okio.ByteString.Companion.encodeUtf8 27 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".encodeUtf8().data 29 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".encodeUtf8().data
|
/external/okio/okio/jvm/jmh/src/jmh/java/com/squareup/okio/benchmarks/ |
D | SegmentedByteStringBenchmark.java | 44 private static final ByteString UNKNOWN = ByteString.encodeUtf8("UNKNOWN"); 45 private static final ByteString SEARCH = ByteString.encodeUtf8("tell");
|
D | BenchmarkUtils.kt | 29 fun String.encodeUtf8(): ByteArray { in encodeUtf8() method
|
/external/okio/okio/src/jvmMain/kotlin/okio/ |
D | ByteString.kt | 242 actual fun String.encodeUtf8(): ByteString = commonEncodeUtf8() in getByte() method 319 fun encodeUtf8(string: String) = string.encodeUtf8() in getByte() method
|
/external/okio/samples/src/jvmMain/java/okio/samples/ |
D | ExploreCharsets.java | 33 System.out.println(" UTF-8 bytes: " + ByteString.encodeUtf8(s).hex()); in dumpStringData()
|
/external/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | Utf8Test.java | 204 processor.encodeUtf8(message, output, 0, output.length); in encodeToByteArray() 212 processor.encodeUtf8(message, buffer); in encodeToByteBuffer()
|