Home
last modified time | relevance | path

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

12345

/external/apache-commons-io/src/test/java/org/apache/commons/io/
DIOUtilsWriteTest.java82 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testWrite_byteArrayToWriter()
97 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testWrite_byteArrayToWriter_Encoding()
104 bytes = new String(bytes, StandardCharsets.UTF_8).getBytes(StandardCharsets.US_ASCII); in testWrite_byteArrayToWriter_Encoding()
113 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testWrite_byteArrayToWriter_Encoding_nullData()
127 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testWrite_byteArrayToWriter_Encoding_nullEncoding()
147 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testWrite_byteArrayToWriter_nullData()
163 final String str = new String(inData, StandardCharsets.US_ASCII); in testWrite_charArrayToOutputStream()
178 final String str = new String(inData, StandardCharsets.US_ASCII); in testWrite_charArrayToOutputStream_Encoding()
188 bytes = new String(bytes, StandardCharsets.UTF_16).getBytes(StandardCharsets.US_ASCII); in testWrite_charArrayToOutputStream_Encoding()
206 final String str = new String(inData, StandardCharsets.US_ASCII); in testWrite_charArrayToOutputStream_Encoding_nullStream()
[all …]
DIOUtilsCopyTest.java175 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testCopy_inputStreamToWriter()
194 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testCopy_inputStreamToWriter_Encoding()
202 bytes = new String(bytes, StandardCharsets.UTF_8).getBytes(StandardCharsets.US_ASCII); in testCopy_inputStreamToWriter_Encoding()
214 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testCopy_inputStreamToWriter_Encoding_nullEncoding()
229 final Writer writer = new OutputStreamWriter(out, StandardCharsets.US_ASCII); in testCopy_inputStreamToWriter_Encoding_nullIn()
244 final Writer writer = new OutputStreamWriter(out, StandardCharsets.US_ASCII); in testCopy_inputStreamToWriter_nullIn()
260 final Reader reader = new InputStreamReader(in, StandardCharsets.US_ASCII); in testCopy_readerToAppendable()
264 final Writer writer = new OutputStreamWriter(baout, StandardCharsets.US_ASCII); in testCopy_readerToAppendable()
294 final Appendable writer = new OutputStreamWriter(out, StandardCharsets.US_ASCII); in testCopy_readerToAppendable_nullIn()
303 final Reader reader = new InputStreamReader(in, StandardCharsets.US_ASCII); in testCopy_readerToAppendable_nullOut()
[all …]
DCopyUtilsTest.java72 final Writer writer = new java.io.OutputStreamWriter(out, StandardCharsets.US_ASCII); in copy_byteArrayToWriter()
89 final Writer writer = new java.io.OutputStreamWriter(out, StandardCharsets.US_ASCII); in copy_inputStreamToWriter()
113 final Reader reader = new java.io.InputStreamReader(in, StandardCharsets.US_ASCII); in copy_readerToWriter()
117 final Writer writer = new java.io.OutputStreamWriter(out, StandardCharsets.US_ASCII); in copy_readerToWriter()
128 final String str = new String(inData, StandardCharsets.US_ASCII); in copy_stringToOutputStream()
147 final String str = new String(inData, StandardCharsets.US_ASCII); in copy_stringToOutputStreamString()
152 CopyUtils.copy(str, out, StandardCharsets.US_ASCII.name()); in copy_stringToOutputStreamString()
166 final String str = new String(inData, StandardCharsets.US_ASCII); in copy_stringToWriter()
170 final Writer writer = new java.io.OutputStreamWriter(out, StandardCharsets.US_ASCII); in copy_stringToWriter()
210 final Reader reader = new java.io.InputStreamReader(in, StandardCharsets.US_ASCII); in testCopy_readerToOutputStream()
[all …]
/external/apache-commons-io/src/test/java/org/apache/commons/io/input/
DXmlStreamReaderTest.java48 private static final String US_ASCII = StandardCharsets.US_ASCII.name(); field in XmlStreamReaderTest
226 …ssertThrows(NullPointerException.class, () -> new XmlStreamReader((URLConnection) null, US_ASCII)); in testConstructorURLConnectionInputNull()
275 testHttpInvalid("application/xml", "UTF-8-bom", US_ASCII, US_ASCII); in testHttp()
281 testHttpValid("text/xml", "no-bom", US_ASCII, null); in testHttp()
290 testHttpValid("text/xml", "UTF-8-bom", US_ASCII, null); in testHttp()
293 testAlternateDefaultEncoding("application/xml", "no-bom", US_ASCII, null, US_ASCII); in testHttp()
295 testAlternateDefaultEncoding("text/xml", "no-bom", US_ASCII, null, null); in testHttp()
296 testAlternateDefaultEncoding("text/xml", "no-bom", US_ASCII, null, US_ASCII); in testHttp()
297 testAlternateDefaultEncoding("text/xml", "no-bom", US_ASCII, null, UTF_8); in testHttp()
311 testHttpLenient("text/xml", "no-bom", US_ASCII, null, US_ASCII); in testHttp()
[all …]
/external/guava/android/guava-tests/test/com/google/common/base/
DCharsetsTest.java35 assertEquals(Charset.forName("US-ASCII"), Charsets.US_ASCII); in testUsAscii()
64 byte[] b1 = "朝日新聞".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
65 byte[] b2 = "聞朝日新".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
66 byte[] b3 = "????".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
67 byte[] b4 = "ニュース".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
68 byte[] b5 = "スューー".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
/external/guava/guava-tests/test/com/google/common/base/
DCharsetsTest.java35 assertEquals(Charset.forName("US-ASCII"), Charsets.US_ASCII); in testUsAscii()
64 byte[] b1 = "朝日新聞".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
65 byte[] b2 = "聞朝日新".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
66 byte[] b3 = "????".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
67 byte[] b4 = "ニュース".getBytes(Charsets.US_ASCII); in testWhyUsAsciiIsDangerous()
68 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/apache-commons-io/src/main/java/org/apache/commons/io/
DCharsets.java68 standardCharsetMap.put(StandardCharsets.US_ASCII.name(), StandardCharsets.US_ASCII); in StandardCharsets.US_ASCII.name()
100 public static final Charset US_ASCII = StandardCharsets.US_ASCII; field in Charsets
/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()
/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/conscrypt/common/src/test/java/org/conscrypt/java/security/cert/
DX509CRLTest.java135 StandardCharsets.US_ASCII))); in testCrl()
137 … new ByteArrayInputStream(REVOKED_CERT.getBytes(StandardCharsets.US_ASCII))); in testCrl()
139 new ByteArrayInputStream(CA_CERT.getBytes(StandardCharsets.US_ASCII))); in testCrl()
176 UNKNOWN_SIGNATURE_OID.getBytes(StandardCharsets.US_ASCII))); in testUnknownSigAlgOID()
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/java/security/cert/
DX509CRLTest.java138 StandardCharsets.US_ASCII))); in testCrl()
140 … new ByteArrayInputStream(REVOKED_CERT.getBytes(StandardCharsets.US_ASCII))); in testCrl()
142 new ByteArrayInputStream(CA_CERT.getBytes(StandardCharsets.US_ASCII))); in testCrl()
179 UNKNOWN_SIGNATURE_OID.getBytes(StandardCharsets.US_ASCII))); in testUnknownSigAlgOID()
/external/apache-commons-lang/src/test/java/org/apache/commons/lang3/
DCharEncodingTest.java51 this.assertSupportedEncoding(CharEncoding.US_ASCII); in testMustBeSupportedJava1_3_1_and_above()
78 assertEquals(StandardCharsets.US_ASCII.name(), CharEncoding.US_ASCII); in testStandardCharsetsEquality()
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/samples/
DBase64Transform.java18 …port static com.google.android.libraries.mobiledatadownload.file.common.internal.Charsets.US_ASCII;
43 Reader reader = new InputStreamReader(wrapped, US_ASCII.newDecoder()); in wrapForRead()
49 Writer writer = new OutputStreamWriter(wrapped, US_ASCII.newEncoder()); in wrapForWrite()
/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/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/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/repackaged/platform/src/test/java/com/android/org/conscrypt/ct/
DCTLogStoreImplTest.java75 .getBytes(StandardCharsets.US_ASCII)));
99 new ByteArrayInputStream(LOGS_SERIALIZED[0].getBytes(StandardCharsets.US_ASCII))); in test_loadLog()
110 new ByteArrayInputStream("randomgarbage".getBytes(StandardCharsets.US_ASCII))); in test_loadLog()
/external/conscrypt/platform/src/test/java/org/conscrypt/ct/
DCTLogStoreImplTest.java71 "-----END PUBLIC KEY-----\n").getBytes(StandardCharsets.US_ASCII)));
95 new ByteArrayInputStream(LOGS_SERIALIZED[0].getBytes(StandardCharsets.US_ASCII))); in test_loadLog()
106 "randomgarbage".getBytes(StandardCharsets.US_ASCII))); in test_loadLog()

12345