Home
last modified time | relevance | path

Searched refs:getBytes (Results 1 – 25 of 731) sorted by relevance

12345678910>>...30

/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/cert/
DCertificateFactory_ImplTest.java216 Base64.decode(b64PublicKeySpec.getBytes("UTF-8")));
262 Base64.decode(pkcs7so.getBytes("UTF-8"))); in testGenerateCRLs()
286 Base64.decode(pkcs7so.getBytes("UTF-8"))); in testGenerateCRL()
292 bais = new ByteArrayInputStream(Base64.decode(pkcs7so.getBytes("UTF-8"))); in testGenerateCRL()
309 (good[i][0] + x509crl + good[i][1]).getBytes("UTF-8")); in testGenerateBase64CRL()
322 (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8")); in testGenerateBase64CRL()
333 (bad[i][0] + x509crl + bad[i][1]).getBytes("UTF-8")); in testGenerateBase64CRL()
408 data[pem_x509] = (good[0][0] + x509crl + good[0][1] + "\n").getBytes("UTF-8"); in testGenerateBase64CRLs()
409 data[asn_x509] = Base64.decode(x509crl.getBytes("UTF-8")); in testGenerateBase64CRLs()
410 data[pem_pkcs] = (good[0][0] + pkcs7so + good[0][1] + "\n").getBytes("UTF-8"); in testGenerateBase64CRLs()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DWriteNumberFormatSerialTestData.java47 file.write(header.getBytes()); in main()
52 file.write(footer.getBytes()); in main()
75 file.write(("\n "+comment).getBytes()); in write()
76 … file.write(new String("\n static byte[] "+name+" = new byte[]{ \n").getBytes("UTF-8")); in write()
77 file.write( " ".getBytes()); in write()
79 file.write(String.valueOf((int)myArr[i]).getBytes()); in write()
80 file.write( ", ".getBytes()); in write()
82 file.write("\n".getBytes()); in write()
83 file.write( " ".getBytes()); in write()
86 file.write(new String("\n };\n").getBytes("UTF-8")); in write()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DWriteNumberFormatSerialTestData.java46 file.write(header.getBytes()); in main()
51 file.write(footer.getBytes()); in main()
74 file.write(("\n "+comment).getBytes()); in write()
75 … file.write(new String("\n static byte[] "+name+" = new byte[]{ \n").getBytes("UTF-8")); in write()
76 file.write( " ".getBytes()); in write()
78 file.write(String.valueOf((int)myArr[i]).getBytes()); in write()
79 file.write( ", ".getBytes()); in write()
81 file.write("\n".getBytes()); in write()
82 file.write( " ".getBytes()); in write()
85 file.write(new String("\n };\n").getBytes("UTF-8")); in write()
/external/jetty/src/java/org/eclipse/jetty/client/security/
DDigestAuthentication.java72 new String(buffer.toString().getBytes(StringUtil.__ISO_8859_1))); in setCredentials()
81 md.update(securityRealm.getPrincipal().getBytes(StringUtil.__ISO_8859_1)); in newResponse()
83 md.update(String.valueOf(details.get("realm")).getBytes(StringUtil.__ISO_8859_1)); in newResponse()
85 md.update(securityRealm.getCredentials().getBytes(StringUtil.__ISO_8859_1)); in newResponse()
89 md.update(exchange.getMethod().getBytes(StringUtil.__ISO_8859_1)); in newResponse()
91 md.update(exchange.getURI().getBytes(StringUtil.__ISO_8859_1)); in newResponse()
94 md.update(TypeUtil.toString(ha1,16).getBytes(StringUtil.__ISO_8859_1)); in newResponse()
96 md.update(String.valueOf(details.get("nonce")).getBytes(StringUtil.__ISO_8859_1)); in newResponse()
98 md.update(NC.getBytes(StringUtil.__ISO_8859_1)); in newResponse()
100 md.update(cnonce.getBytes(StringUtil.__ISO_8859_1)); in newResponse()
[all …]
/external/apache-harmony/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/
DCertFactoryTestData.java298 return Base64.decode(certPathPKCS7Base64.getBytes("UTF-8")); in getCertPathPKCS7Encoding()
302 return Base64.decode(certPathPkiPathBase64.getBytes("UTF-8")); in getCertPathPkiPathEncoding()
306 return Base64.decode(certEncodingBase64.getBytes("UTF-8")); in getCertEncoding()
310 return base64certEncoding.getBytes("UTF-8"); in getBase64CertEncoding()
314 return crlEncodingPEM.getBytes("UTF-8"); in getBase64CRLEncoding()
318 return Base64.decode(crlEncodingBase64.getBytes("UTF-8")); in getCRLEncoding()
/external/icu/icu4c/source/i18n/
Dsortkey.cpp69 uprv_memcpy(getBytes(), newValues, count); in CollationKey()
90 uprv_memcpy(getBytes(), other.getBytes(), length); in CollationKey()
103 uprv_memcpy(newBytes, getBytes(), length); in reallocate()
143 uprv_memcmp(getBytes(), source.getBytes(), getLength()) == 0); in operator ==()
161 uprv_memcpy(getBytes(), other.getBytes(), length); in operator =()
183 const uint8_t *src = getBytes(); in compareTo()
184 const uint8_t *tgt = target.getBytes(); in compareTo()
270 fHashCode = computeHashCode(getBytes(), getLength()); in hashCode()
/external/smali/util/src/test/java/org/jf/util/
DClassFileNameHandlerTest.java53 Assert.assertEquals(95, result.getBytes(UTF8).length); in test1ByteEncodings()
66 Assert.assertEquals(200, sb.toString().getBytes(UTF8).length); in test2ByteEncodings()
67 Assert.assertEquals(195, result.getBytes(UTF8).length); in test2ByteEncodings()
72 Assert.assertEquals(200, sb.toString().getBytes(UTF8).length); in test2ByteEncodings()
73 Assert.assertEquals(195, result.getBytes(UTF8).length); in test2ByteEncodings()
86 Assert.assertEquals(300, sb.toString().getBytes(UTF8).length); in test3ByteEncodings()
87 Assert.assertEquals(292, result.getBytes(UTF8).length); in test3ByteEncodings()
92 Assert.assertEquals(300, sb.toString().getBytes(UTF8).length); in test3ByteEncodings()
93 Assert.assertEquals(292, result.getBytes(UTF8).length); in test3ByteEncodings()
106 Assert.assertEquals(400, sb.toString().getBytes(UTF8).length); in test4ByteEncodings()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
DCertBlacklist.java171 "410f36363258f30b347d12ce4863e433437806a8".getBytes(), in readPublicKeyBlackList()
174 "ba3e7bd38cd7e1e6b9cd4c219962e59d7a2f4e37".getBytes(), in readPublicKeyBlackList()
177 "e23b8d105f87710a68d9248050ebefc627be4ca6".getBytes(), in readPublicKeyBlackList()
180 "7b2e16bc39bcd72b456e9f055d1de615b74945db".getBytes(), in readPublicKeyBlackList()
183 "e8f91200c65cee16e039b9f883841661635f81c5".getBytes(), in readPublicKeyBlackList()
187 "0129bcd5b448ae8d2496d1c3e19723919088e152".getBytes(), in readPublicKeyBlackList()
190 "5f3ab33d55007054bc5e3e5553cd8d8465d77c61".getBytes(), in readPublicKeyBlackList()
193 "783333c9687df63377efceddd82efa9101913e8e".getBytes(), in readPublicKeyBlackList()
196 "3ecf4bbbe46096d514bb539bb913d77aa4ef31bf".getBytes() in readPublicKeyBlackList()
205 bl.add(value.getBytes()); in readPublicKeyBlackList()
/external/conscrypt/src/platform/java/org/conscrypt/
DCertBlacklist.java170 "410f36363258f30b347d12ce4863e433437806a8".getBytes(), in readPublicKeyBlackList()
173 "ba3e7bd38cd7e1e6b9cd4c219962e59d7a2f4e37".getBytes(), in readPublicKeyBlackList()
176 "e23b8d105f87710a68d9248050ebefc627be4ca6".getBytes(), in readPublicKeyBlackList()
179 "7b2e16bc39bcd72b456e9f055d1de615b74945db".getBytes(), in readPublicKeyBlackList()
182 "e8f91200c65cee16e039b9f883841661635f81c5".getBytes(), in readPublicKeyBlackList()
186 "0129bcd5b448ae8d2496d1c3e19723919088e152".getBytes(), in readPublicKeyBlackList()
189 "5f3ab33d55007054bc5e3e5553cd8d8465d77c61".getBytes(), in readPublicKeyBlackList()
192 "783333c9687df63377efceddd82efa9101913e8e".getBytes(), in readPublicKeyBlackList()
195 "3ecf4bbbe46096d514bb539bb913d77aa4ef31bf".getBytes() in readPublicKeyBlackList()
204 bl.add(value.getBytes()); in readPublicKeyBlackList()
/external/apache-harmony/support/src/test/java/org/apache/harmony/testframework/
DSinkTester.java49 public abstract byte[] getBytes() throws Exception; in getBytes() method in SinkTester
99 assertArrayEquals(expected, getBytes()); in sinkTestNoWriting()
112 assertArrayEquals(expected, getBytes()); in sinkTestWriteZeroBytes()
124 assertArrayEquals(expected, getBytes()); in sinkTestWriteByteByByte()
146 assertArrayEquals(expected, getBytes()); in sinkTestWriteArray()
177 assertArrayEquals(expected, getBytes()); in sinkTestWriteOffset()
188 assertArrayEquals(expected, getBytes()); in sinkTestWriteLargeArray()
204 assertArrayEquals(expectedBytes, getBytes()); in sinkTestWriteAfterClose()
/external/sl4a/Common/src/com/googlecode/android_scripting/webcam/
DMjpegServer.java50 "Content-Type: multipart/x-mixed-replace; boundary=--BoundaryString\r\n\r\n").getBytes()); in handleConnection()
56 outputStream.write("--BoundaryString\r\n".getBytes()); in handleConnection()
57 outputStream.write("Content-type: image/jpg\r\n".getBytes()); in handleConnection()
58 outputStream.write(("Content-Length: " + data.length + "\r\n\r\n").getBytes()); in handleConnection()
60 outputStream.write("\r\n\r\n".getBytes()); in handleConnection()
/external/jacoco/org.jacoco.report.test/src/org/jacoco/report/
DZipMultiReportOutputTest.java50 final byte[] content1 = "HelloZip".getBytes(); in testWrite1()
65 final byte[] content1 = "HelloZip".getBytes("ISO-8859-1"); in testWrite2()
75 assertArrayEquals("Zip".getBytes("ISO-8859-1"), entries.get("b.txt")); in testWrite2()
95 final byte[] content1 = "HelloZip".getBytes(); in testCreateFiles()
101 final byte[] content2 = "HelloWorld".getBytes(); in testCreateFiles()
119 final byte[] content1 = "HelloZip".getBytes(); in testCreateFilesWithoutClose()
124 final byte[] content2 = "HelloWorld".getBytes(); in testCreateFilesWithoutClose()
143 out.write("HelloZip".getBytes()); in testWriteToClosedStream1()
150 out.write("HelloZip".getBytes(), 2, 3); in testWriteToClosedStream2()
/external/guava/guava-tests/test/com/google/common/base/
DCharsetsTest.java66 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/javassist/src/main/javassist/tools/web/
DWebserver.java360 out.write("HTTP/1.0 200 OK".getBytes()); in sendHeader()
362 out.write("Content-Length: ".getBytes()); in sendHeader()
363 out.write(Long.toString(dataLength).getBytes()); in sendHeader()
366 out.write("Content-Type: application/octet-stream".getBytes()); in sendHeader()
368 out.write("Content-Type: text/html".getBytes()); in sendHeader()
370 out.write("Content-Type: image/gif".getBytes()); in sendHeader()
372 out.write("Content-Type: image/jpg".getBytes()); in sendHeader()
374 out.write("Content-Type: text/plain".getBytes()); in sendHeader()
384 out.write("HTTP/1.0 400 Bad Request".getBytes()); in replyError()
387 out.write("<H1>Bad Request</H1>".getBytes()); in replyError()
/external/jetty/src/java/org/eclipse/jetty/security/authentication/
DDigestAuthenticator.java361 md.update(username.getBytes(StringUtil.__ISO_8859_1)); in check()
363 md.update(realm.getBytes(StringUtil.__ISO_8859_1)); in check()
365 md.update(password.getBytes(StringUtil.__ISO_8859_1)); in check()
370 md.update(method.getBytes(StringUtil.__ISO_8859_1)); in check()
372 md.update(uri.getBytes(StringUtil.__ISO_8859_1)); in check()
382 md.update(TypeUtil.toString(ha1, 16).getBytes(StringUtil.__ISO_8859_1)); in check()
384 md.update(nonce.getBytes(StringUtil.__ISO_8859_1)); in check()
386 md.update(nc.getBytes(StringUtil.__ISO_8859_1)); in check()
388 md.update(cnonce.getBytes(StringUtil.__ISO_8859_1)); in check()
390 md.update(qop.getBytes(StringUtil.__ISO_8859_1)); in check()
[all …]
/external/mockwebserver/src/main/java/com/google/mockwebserver/
DMockResponse.java176 return setBody(body.getBytes("UTF-8")); in setBody()
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()
216 return setChunkedBody(body.getBytes("UTF-8"), maxChunkSize); in setChunkedBody()
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/
DSignature2Test.java173 sig.update(MESSAGE.getBytes()); in test_sign()
192 byte[] bytes = MESSAGE.getBytes(); in test_update$B()
203 byte[] bytes = MESSAGE.getBytes(); in test_update$BII()
214 sig.update(MESSAGE.getBytes()[0]); in test_updateB()
223 sig.update(MESSAGE.getBytes()); in test_verify$B()
228 sig.update(MESSAGE.getBytes()); in test_verify$B()
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/
DCameraTest.java115 shadowCamera.invokePreviewCallback("foobar".getBytes()); in testSetPreviewCallbacks()
118 assertThat(callback.data, equalTo("foobar".getBytes())); in testSetPreviewCallbacks()
128 shadowCamera.invokePreviewCallback("foobar".getBytes()); in testSetOneShotPreviewCallbacks()
131 assertThat(callback.data, equalTo("foobar".getBytes())); in testSetOneShotPreviewCallbacks()
141 shadowCamera.invokePreviewCallback("foobar".getBytes()); in testPreviewCallbacksWithBuffers()
144 assertThat(callback.data, equalTo("foobar".getBytes())); in testPreviewCallbacksWithBuffers()
156 shadowCamera.invokePreviewCallback("foobar".getBytes()); in testClearPreviewCallback()
163 shadowCamera.invokePreviewCallback("foobar".getBytes()); in testClearPreviewCallback()
170 shadowCamera.invokePreviewCallback("foobar".getBytes()); in testClearPreviewCallback()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/charsetdet/
DTestCharsetDetector.java146 byte[] bytes = s.getBytes("ISO-8859-1"); in TestInputFilter()
177 byte [] bytes = s.getBytes("UTF-8"); in TestUTF8()
200 byte[] beBytes = source.getBytes("UnicodeBig"); in TestUTF16()
201 byte[] leBytes = source.getBytes("UnicodeLittle"); in TestUTF16()
234 byte[] bISO = sISO.getBytes("ISO-8859-1"); in TestC1Bytes()
235 byte[] bWindows = sWindows.getBytes("windows-1252"); in TestC1Bytes()
395 bytesString.getBytes(0, bytesString.length(), bytes, 0); in TestDetection()
470 bytes = testString.getBytes(encoding); in checkEncoding()
520 bytes = s.getBytes("EUC-JP"); in TestJapanese()
555 bytes = s.getBytes("windows-1256"); in TestArabic()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/charsetdet/
DTestCharsetDetector.java142 byte[] bytes = s.getBytes("ISO-8859-1"); in TestInputFilter()
173 byte [] bytes = s.getBytes("UTF-8"); in TestUTF8()
196 byte[] beBytes = source.getBytes("UnicodeBig"); in TestUTF16()
197 byte[] leBytes = source.getBytes("UnicodeLittle"); in TestUTF16()
230 byte[] bISO = sISO.getBytes("ISO-8859-1"); in TestC1Bytes()
231 byte[] bWindows = sWindows.getBytes("windows-1252"); in TestC1Bytes()
391 bytesString.getBytes(0, bytesString.length(), bytes, 0); in TestDetection()
466 bytes = testString.getBytes(encoding); in checkEncoding()
516 bytes = s.getBytes("EUC-JP"); in TestJapanese()
551 bytes = s.getBytes("windows-1256"); in TestArabic()
[all …]
/external/apache-http/src/org/apache/http/util/
DEncodingUtils.java110 public static byte[] getBytes(final String data, final String charset) { in getBytes() method in EncodingUtils
121 return data.getBytes(charset); in getBytes()
123 return data.getBytes(); in getBytes()
140 return data.getBytes(HTTP.US_ASCII); in getAsciiBytes()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/stringprep/
DTestStringPrep.java106 byte[] dest = NFS4StringPrep.mixed_prepare(src.getBytes("UTF-8")); in TestNFS4MixedPrep()
120 byte[] dest = NFS4StringPrep.mixed_prepare(src.getBytes("UTF-8")); in TestNFS4MixedPrep()
138 byte[] dest =NFS4StringPrep.cis_prepare(src.getBytes("UTF-8")); in TestCISPrep()
157 NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), false); in TestCSPrep()
165 byte[] dest = NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), false); in TestCSPrep()
178 byte[] dest = NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), false); in TestCSPrep()
190 byte[] dest = NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), true); in TestCSPrep()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/
DTestStringPrep.java110 byte[] dest = NFS4StringPrep.mixed_prepare(src.getBytes("UTF-8")); in TestNFS4MixedPrep()
124 byte[] dest = NFS4StringPrep.mixed_prepare(src.getBytes("UTF-8")); in TestNFS4MixedPrep()
142 byte[] dest =NFS4StringPrep.cis_prepare(src.getBytes("UTF-8")); in TestCISPrep()
161 NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), false); in TestCSPrep()
169 byte[] dest = NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), false); in TestCSPrep()
182 byte[] dest = NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), false); in TestCSPrep()
194 byte[] dest = NFS4StringPrep.cs_prepare(src.getBytes("UTF-8"), true); in TestCSPrep()
/external/guava/guava-tests/test/com/google/common/hash/
DCrc32cHashFunctionTest.java83 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()
/external/mockftpserver/tags/2.x_Before_IDEA/src/test/groovy/org/mockftpserver/fake/filesystem/
DFileEntryTest.groovy57 byte[] contents = CONTENTS.getBytes()
84 out.write(CONTENTS.getBytes())
89 out.write(CONTENTS.getBytes())
94 out.write(CONTENTS.getBytes())
104 out.write(CONTENTS.getBytes())
109 out2.write(CONTENTS.getBytes())
114 out.write(NEW_CONTENTS.getBytes())
167 … assertEquals("contents: actual=[" + new String(bytes) + "]", expectedContents.getBytes(), bytes)

12345678910>>...30