Home
last modified time | relevance | path

Searched refs:US_ASCII (Results 1 – 25 of 64) sorted by relevance

123

/external/guava/guava-tests/test/com/google/common/base/
DCharsetsTest.java37 assertEquals(Charset.forName("US-ASCII"), Charsets.US_ASCII); in testUsAscii()
66 byte[] b1 = "朝日新聞".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
67 byte[] b2 = "聞朝日新".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
68 byte[] b3 = "????".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
69 byte[] b4 = "ニュース".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
70 byte[] b5 = "スューー".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DTransportFrameUtilTest.java19 import static com.google.common.base.Charsets.US_ASCII;
73 "plainstring".getBytes(US_ASCII), COMPLIANT_ASCII_STRING.getBytes(US_ASCII), in testToHttp2Headers()
74 "string-bin".getBytes(US_ASCII), in testToHttp2Headers()
75 base64Encode(NONCOMPLIANT_ASCII_STRING.getBytes(US_ASCII))}; in testToHttp2Headers()
103 String keyString = new String(key, US_ASCII); in assertContains()
114 return BaseEncoding.base64().encode(input).getBytes(US_ASCII); in base64Encode()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DTransportFrameUtil.java19 import static com.google.common.base.Charsets.US_ASCII;
38 Metadata.BINARY_HEADER_SUFFIX.getBytes(US_ASCII);
61 serializedHeaders[k + 1] = BaseEncoding.base64().encode(value).getBytes(US_ASCII); in toHttp2Headers()
72 String keyString = new String(key, US_ASCII); in toHttp2Headers()
101 http2Headers[i + 1] = BaseEncoding.base64().decode(new String(value, US_ASCII)); in toRawSerializedHeaders()
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/zip/
DUTF8ZipFilesTest.java64 testFileRoundtrip(CharsetNames.US_ASCII, false, true); in testASCIIFileRoundtripExplicitUnicodeExtra()
88 testFileRoundtrip(CharsetNames.US_ASCII, false, false); in testASCIIFileRoundtripImplicitUnicodeExtra()
181 createTestFile(file, CharsetNames.US_ASCII, false, true); in testZipFileReadsUnicodeFields()
183 zi = new ZipArchiveInputStream(archive, CharsetNames.US_ASCII, true); in testZipFileReadsUnicodeFields()
202 createTestFile(file, CharsetNames.US_ASCII, false, true); in testZipArchiveInputStreamReadsUnicodeFields()
203 zf = new ZipFile(file, CharsetNames.US_ASCII, true); in testZipArchiveInputStreamReadsUnicodeFields()
288 zos.write("Hello, world!".getBytes(CharsetNames.US_ASCII)); in createTestFile()
305 zos.write("Give me your money!".getBytes(CharsetNames.US_ASCII)); in createTestFile()
323 zos.write("ascii".getBytes(CharsetNames.US_ASCII)); in createTestFile()
/external/mockwebserver/src/main/java/com/google/mockwebserver/
DMockResponse.java29 import static java.nio.charset.StandardCharsets.US_ASCII;
195 bytesOut.write(Integer.toHexString(chunkSize).getBytes(US_ASCII)); in setChunkedBody()
196 bytesOut.write("\r\n".getBytes(US_ASCII)); in setChunkedBody()
198 bytesOut.write("\r\n".getBytes(US_ASCII)); in setChunkedBody()
201 bytesOut.write("0\r\n\r\n".getBytes(US_ASCII)); // last chunk + empty trailer + crlf in setChunkedBody()
DMockWebServer.java462 out.write(("HTTP/1.1 100 Continue\r\n").getBytes(StandardCharsets.US_ASCII)); in readRequest()
463 out.write(("Content-Length: 0\r\n").getBytes(StandardCharsets.US_ASCII)); in readRequest()
464 out.write(("\r\n").getBytes(StandardCharsets.US_ASCII)); in readRequest()
509 out.write((response.getStatus() + "\r\n").getBytes(StandardCharsets.US_ASCII)); in writeResponse()
513 out.write((header + "\r\n").getBytes(StandardCharsets.US_ASCII)); in writeResponse()
515 out.write(("\r\n").getBytes(StandardCharsets.US_ASCII)); in writeResponse()
/external/grpc-grpc-java/core/src/test/java/io/grpc/
DMetadataTest.java19 import static com.google.common.base.Charsets.US_ASCII;
63 private static final byte[] LANCE_BYTES = LANCE.getBytes(US_ASCII);
149 assertEquals("test-bin", new String(serialized[0], US_ASCII)); in testWriteParsed()
242 t = new Metadata("test".getBytes(US_ASCII), "ascii".getBytes(US_ASCII), in verifyToString()
243 "test-bin".getBytes(US_ASCII), "binary".getBytes(US_ASCII)); in verifyToString()
284 assertArrayEquals("if-modified-since".getBytes(US_ASCII), bytes[0]); in testKeyCaseHandling()
285 assertArrayEquals("plain string".getBytes(US_ASCII), bytes[1]); in testKeyCaseHandling()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/utils/
DArchiveUtils.java76 buffer1 = expected.getBytes(CharsetNames.US_ASCII); in matchAsciiBuffer()
104 return inputString.getBytes(CharsetNames.US_ASCII); in toAsciiBytes()
119 return new String(inputBytes, CharsetNames.US_ASCII); in toAsciiString()
136 return new String(inputBytes, offset, length, CharsetNames.US_ASCII); in toAsciiString()
DCharsets.java113 public static final Charset US_ASCII = StandardCharsets.US_ASCII; field in Charsets
/external/apache-http/src/org/apache/http/protocol/
DHTTP.java81 public static final String US_ASCII = "US-ASCII"; field in HTTP
87 public static final String DEFAULT_PROTOCOL_CHARSET = US_ASCII;
/external/icu/icu4j/main/classes/charset/src/com/ibm/icu/charset/
DUConverterSharedData.java380 static final int US_ASCII = ISCII + 1; // 26 field in UConverterSharedData.UConverterType
381 static final int UTF7 = US_ASCII + 1; // 27
/external/apache-http/src/org/apache/http/util/
DEncodingUtils.java140 return data.getBytes(HTTP.US_ASCII); in getAsciiBytes()
163 return new String(data, offset, length, HTTP.US_ASCII); in getAsciiString()
/external/grpc-grpc-java/core/src/main/java/io/grpc/
DMetadata.java19 import static com.google.common.base.Charsets.US_ASCII;
466 String headerName = new String(name(i), US_ASCII); in toString()
471 String headerValue = new String(value(i), US_ASCII); in toString()
637 this.nameBytes = this.name.getBytes(US_ASCII); in Key()
751 return marshaller.toAsciiString(value).getBytes(US_ASCII); in toBytes()
756 return marshaller.parseAsciiString(new String(serialized, US_ASCII)); in parseBytes()
DStatus.java19 import static com.google.common.base.Charsets.US_ASCII;
207 this.valueAscii = Integer.toString(value).getBytes(US_ASCII); in Code()
335 return UNKNOWN.withDescription("Unknown code " + new String(asciiCodeValue, US_ASCII)); in fromCodeValueSlow()
635 buf.put((byte)Integer.parseInt(new String(value, i + 1, 2, US_ASCII), 16)); in parseAsciiStringSlow()
/external/conscrypt/repackaged/openjdk/src/test/java/com/android/org/conscrypt/
DApplicationProtocolSelectorAdapterTest.java36 private static Charset US_ASCII = Charset.forName("US-ASCII"); field in ApplicationProtocolSelectorAdapterTest
90 return new String(PROTOCOL_BYTES, index + 1, len, US_ASCII); in getProtocolAt()
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DApplicationProtocolSelectorAdapterTest.java32 private static Charset US_ASCII = Charset.forName("US-ASCII"); field in ApplicationProtocolSelectorAdapterTest
86 return new String(PROTOCOL_BYTES, index + 1, len, US_ASCII); in getProtocolAt()
/external/grpc-grpc-java/services/src/test/java/io/grpc/services/
DBinlogHelperTest.java83 private static final Charset US_ASCII = Charset.forName("US-ASCII"); field in BinlogHelperTest
104 .setKey(ByteString.copyFrom(KEY_A.name(), US_ASCII))
105 .setValue(ByteString.copyFrom(DATA_A.getBytes(US_ASCII)))
110 .setKey(ByteString.copyFrom(KEY_B.name(), US_ASCII))
111 .setValue(ByteString.copyFrom(DATA_B.getBytes(US_ASCII)))
116 .setKey(ByteString.copyFrom(KEY_C.name(), US_ASCII))
117 .setValue(ByteString.copyFrom(DATA_C.getBytes(US_ASCII)))
497 = "this is a long message: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".getBytes(US_ASCII); in messageToProto()
514 = "this is a long message: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".getBytes(US_ASCII); in messageToProto_truncated()
534 .setData(ByteString.copyFrom(truncatedMessage.getBytes(US_ASCII))) in messageToProto_truncated()
[all …]
/external/guava/guava-tests/test/com/google/common/hash/
DFunnelsTest.java157 Funnels.stringFunnel(Charsets.US_ASCII), in testSerialization()
158 SerializableTester.reserialize(Funnels.stringFunnel(Charsets.US_ASCII))); in testSerialization()
168 .addEqualityGroup(Funnels.stringFunnel(Charsets.US_ASCII)) in testEquals()
DHashCodeTest.java173 HashCode hash1 = Hashing.sha1().hashString("foo", Charsets.US_ASCII); in testRoundTripHashCodeUsingBaseEncoding()
206 HashCode hash1 = Hashing.sha1().hashString("foo", Charsets.US_ASCII); in testRoundTripHashCodeUsingFromString()
231 String string = Hashing.sha1().hashString("foo", Charsets.US_ASCII).toString().toUpperCase(); in testFromStringFailsWithUpperCaseString()
/external/apache-http/src/org/apache/commons/codec/net/
DRFC1522Codec.java83 buffer.append(new String(rawdata, StringEncodings.US_ASCII)); in encodeText()
131 byte[] data = text.substring(from, to).getBytes(StringEncodings.US_ASCII); in decodeText()
/external/sl4a/Common/src/org/apache/commons/codec/binary/
DStringUtils.java64 return StringUtils.getBytesUnchecked(string, CharEncoding.US_ASCII); in getBytesUsAscii()
219 return StringUtils.newString(bytes, CharEncoding.US_ASCII); in newStringUsAscii()
/external/conscrypt/common/src/main/java/org/conscrypt/
DSSLUtils.java68 private static final Charset US_ASCII = Charset.forName("US-ASCII"); field in SSLUtils
378 return new String(bytes, US_ASCII); in toProtocolString()
385 return protocol.getBytes(US_ASCII); in toProtocolBytes()
418 ? new String(protocols, i + 1, protocolLength, US_ASCII) in decodeProtocols()
/external/guava/guava-tests/test/com/google/common/io/
DFilesTest.java76 assertTrue(Arrays.equals(ASCII.getBytes(Charsets.US_ASCII), in testToByteArray()
91 assertTrue(Arrays.equals(ASCII.getBytes(Charsets.US_ASCII), bytes)); in testReadFile_withCorrectSize()
106 assertTrue(Arrays.equals(ASCII.getBytes(Charsets.US_ASCII), bytes)); in testReadFile_withSmallerSize()
121 assertTrue(Arrays.equals(ASCII.getBytes(Charsets.US_ASCII), bytes)); in testReadFile_withLargerSize()
136 assertTrue(Arrays.equals(ASCII.getBytes(Charsets.US_ASCII), bytes)); in testReadFile_withSizeZero()
167 assertEquals(ASCII, Files.toString(asciiFile, Charsets.US_ASCII)); in testToString()
169 assertThat(Files.toString(i18nFile, Charsets.US_ASCII)) in testToString()
297 BufferedReader r = Files.newReader(asciiFile, Charsets.US_ASCII); in testNewReader()
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DSSLUtils.java69 private static final Charset US_ASCII = Charset.forName("US-ASCII"); field in SSLUtils
379 return new String(bytes, US_ASCII); in toProtocolString()
386 return protocol.getBytes(US_ASCII); in toProtocolBytes()
419 ? new String(protocols, i + 1, protocolLength, US_ASCII) in decodeProtocols()
/external/apache-http/src/org/apache/http/impl/io/
DAbstractSessionOutputBuffer.java66 private String charset = HTTP.US_ASCII;
84 this.ascii = this.charset.equalsIgnoreCase(HTTP.US_ASCII) in init()

123