Home
last modified time | relevance | path

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

1234567891011

/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()
291 bais = new ByteArrayInputStream(Base64.decode(pkcs7so.getBytes("UTF-8"))); in testGenerateCRL()
307 (good[i][0] + x509crl + good[i][1]).getBytes("UTF-8")); in testGenerateBase64CRL()
320 (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8")); in testGenerateBase64CRL()
331 (bad[i][0] + x509crl + bad[i][1]).getBytes("UTF-8")); in testGenerateBase64CRL()
401 data[pem_x509] = (good[0][0] + x509crl + good[0][1] + "\n").getBytes("UTF-8"); in testGenerateBase64CRLs()
402 data[asn_x509] = Base64.decode(x509crl.getBytes("UTF-8")); in testGenerateBase64CRLs()
403 data[pem_pkcs] = (good[0][0] + pkcs7so + good[0][1] + "\n").getBytes("UTF-8"); in testGenerateBase64CRLs()
[all …]
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/
DDatagramPacketTest.java37 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5); in test_Constructor$BI()
57 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 2, 3); in test_Constructor$BII()
69 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 2, 3, in test_Constructor$BIILjava_net_InetAddressI()
82 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5, in test_Constructor$BILjava_net_InetAddressI()
94 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5, in test_getAddress()
104 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5); in test_getData()
113 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5); in test_getLength()
121 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 3, 2); in test_getOffset()
129 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5, in test_getPort()
152 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5, in test_setAddressLjava_net_InetAddress()
[all …]
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/
DByteArrayOutputStreamTest.java94 bos.write(fileString.getBytes(), 0, 100); in test_reset()
104 bos.write(fileString.getBytes(), 0, 100); in test_size()
115 byte[] sbytes = fileString.getBytes(); in test_toByteArray()
117 bos.write(fileString.getBytes(), 0, fileString.length()); in test_toByteArray()
130 bos.write(fileString.getBytes("UTF-8"), 0, fileString.length()); in test_toStringLjava_lang_String()
135 bos.write(fileString.getBytes("UTF-8"), 0, fileString.length()); in test_toStringLjava_lang_String()
145 bos.write(fileString.getBytes(), 0, fileString.length()); in test_toString()
156 bos.write(fileString.getBytes(), 0, fileString.length()); in test_toStringI()
177 bos.write(fileString.getBytes(), 0, 100); in test_write$BII()
203 bos.write(fileString.getBytes(), 0, 100); in test_writeToLjava_io_OutputStream()
DPushbackInputStreamTest.java66 .getBytes())); in test_ConstructorLjava_io_InputStream()
67 pis.unread("He".getBytes()); in test_ConstructorLjava_io_InputStream()
82 .getBytes()), 5); in test_ConstructorLjava_io_InputStreamI()
83 pis.unread("Hellos".getBytes()); in test_ConstructorLjava_io_InputStreamI()
113 .available() == fileString.getBytes().length); in test_available()
134 .getBytes("UTF-8")[0]); in test_read()
227 .getBytes("UTF-8")[0]); in test_unreadI()
242 .getBytes("UTF-8")), 65535); in setUp()
DSequenceInputStreamTest.java58 InputStream is = new ByteArrayInputStream(s1.getBytes("UTF-8")); in test_Constructor_LInputStreamLInputStream_Null()
74 streams[0] = new ByteArrayInputStream(s1.getBytes("UTF-8")); in test_ConstructorLjava_util_Enumeration()
75 streams[1] = new ByteArrayInputStream(s2.getBytes("UTF-8")); in test_ConstructorLjava_util_Enumeration()
183 si = new SequenceInputStream(new ByteArrayInputStream(s1.getBytes("UTF-8")), in setUp()
184 new ByteArrayInputStream(s2.getBytes("UTF-8"))); in setUp()
DRandomAccessFileTest.java93 raf.write("Test".getBytes(), 0, 4); in test_ConstructorLjava_lang_StringLjava_lang_String()
97 raf.write("Test".getBytes(), 0, 4); in test_ConstructorLjava_lang_StringLjava_lang_String()
101 raf.write("Test".getBytes(), 0, 4); in test_ConstructorLjava_lang_StringLjava_lang_String()
156 raf.write("Test".getBytes(), 0, 4); in test_close()
181 raf.write(fileString.getBytes(), 0, 1000); in test_getFilePointer()
193 raf.write(fileString.getBytes()); in test_length()
205 fos.write(fileString.getBytes("UTF-8"), 0, fileString.length()); in test_read()
220 fos.write(fileString.getBytes(), 0, fileString.length()); in test_read$B()
239 fos.write(fileString.getBytes(), 0, fileString.length()); in test_read$BII()
364 raf.write(s.getBytes("UTF-8"), 0, s.length()); in test_readLine()
[all …]
DBufferedOutputStreamTest.java42 os.write(fileString.getBytes(), 0, 500); in test_ConstructorLjava_io_OutputStream()
52 os.write(fileString.getBytes(), 0, 500); in test_ConstructorLjava_io_OutputStreamI()
104 os.write(fileString.getBytes(), 0, 500); in test_flush()
133 os.write(fileString.getBytes(), 0, 500); in test_write$BII()
139 os.write(fileString.getBytes(), 500, 513); in test_write$BII()
151 bos.write("a".getBytes()); in test_write$BII()
152 bos.write("bcde".getBytes()); in test_write$BII()
157 bos.write("ab".getBytes()); in test_write$BII()
158 bos.write("cd".getBytes()); in test_write$BII()
672 byte[] buffer = "1234567890".getBytes(); in test_write_Close()
[all …]
DFilterOutputStreamTest.java55 os.write(fileString.getBytes(), 0, 500); in test_close()
67 os.write(fileString.getBytes(), 0, 500); in test_flush()
79 os.write(fileString.getBytes()); in test_write$B()
96 os.write(fileString.getBytes(), 0, fileString.length()); in test_write$BII()
DFileWriterTest.java50 fos.write("Test String".getBytes()); in test_ConstructorLjava_io_File()
106 fos.write("Test String".getBytes()); in test_ConstructorLjava_io_FileDescriptor()
123 fos.write("Test String".getBytes()); in test_ConstructorLjava_lang_String()
141 fos.write("Test String".getBytes()); in test_ConstructorLjava_lang_StringZ()
154 fos.write("Test String".getBytes()); in test_ConstructorLjava_lang_StringZ()
/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/apache-harmony/auth/src/test/java/common/org/apache/harmony/auth/tests/jgss/
DGSSUtilsTest.java28 byte[] bytes = GSSUtils.getBytes(i, 1); in testGSSUtils_getBytes_and_getInt()
33 bytes = GSSUtils.getBytes(i, 1); in testGSSUtils_getBytes_and_getInt()
38 bytes = GSSUtils.getBytes(i, 2); in testGSSUtils_getBytes_and_getInt()
43 bytes = GSSUtils.getBytes(i, 2); in testGSSUtils_getBytes_and_getInt()
48 bytes = GSSUtils.getBytes(i, 3); in testGSSUtils_getBytes_and_getInt()
53 bytes = GSSUtils.getBytes(i, 4); in testGSSUtils_getBytes_and_getInt()
/external/apache-harmony/support/src/test/java/org/apache/harmony/testframework/
DSinkTester.java49 public abstract byte[] getBytes() throws Exception; in getBytes() method in SinkTester
98 assertArrayEquals(expected, getBytes()); in sinkTestNoWriting()
111 assertArrayEquals(expected, getBytes()); in sinkTestWriteZeroBytes()
123 assertArrayEquals(expected, getBytes()); in sinkTestWriteByteByByte()
145 assertArrayEquals(expected, getBytes()); in sinkTestWriteArray()
176 assertArrayEquals(expected, getBytes()); in sinkTestWriteOffset()
187 assertArrayEquals(expected, getBytes()); in sinkTestWriteLargeArray()
203 assertArrayEquals(expectedBytes, getBytes()); in sinkTestWriteAfterClose()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
DCertBlacklist.java165 "410f36363258f30b347d12ce4863e433437806a8".getBytes(), in readPublicKeyBlackList()
168 "ba3e7bd38cd7e1e6b9cd4c219962e59d7a2f4e37".getBytes(), in readPublicKeyBlackList()
171 "e23b8d105f87710a68d9248050ebefc627be4ca6".getBytes(), in readPublicKeyBlackList()
174 "7b2e16bc39bcd72b456e9f055d1de615b74945db".getBytes(), in readPublicKeyBlackList()
177 "e8f91200c65cee16e039b9f883841661635f81c5".getBytes(), in readPublicKeyBlackList()
181 "0129bcd5b448ae8d2496d1c3e19723919088e152".getBytes(), in readPublicKeyBlackList()
184 "5f3ab33d55007054bc5e3e5553cd8d8465d77c61".getBytes(), in readPublicKeyBlackList()
187 "783333c9687df63377efceddd82efa9101913e8e".getBytes() in readPublicKeyBlackList()
196 bl.add(value.getBytes()); in readPublicKeyBlackList()
/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/apache-harmony/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/
DZipOutputStreamTest.java70 zos.write("Hello World".getBytes("UTF-8")); in test_closeEntry()
83 zos.write("Hello World".getBytes()); in test_finish()
106 zos.write("Hello World".getBytes()); in test_putNextEntryLjava_util_zip_ZipEntry()
144 zos.write(data.getBytes()); in test_setLevelI()
149 zos.write(data.getBytes()); in test_setLevelI()
161 tempCrc.update(data.getBytes()); in test_setMethodI()
165 zos.write(data.getBytes()); in test_setMethodI()
170 zos.write(data.getBytes()); in test_setMethodI()
181 zos.write(data.getBytes()); in test_write$BII()
DInflaterTest.java771 byte[] input = inputString.getBytes("UTF-8"); in test_getBytesRead()
797 byte[] input = inputString.getBytes("UTF-8"); in test_getBytesWritten()
864 defDict1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B()
865 defDict2.setDictionary(dictionary2.getBytes()); in testSetDictionary$B()
867 defDictNo.setInput(inputString.getBytes()); in testSetDictionary$B()
868 defDict1.setInput(inputString.getBytes()); in testSetDictionary$B()
869 defDict2.setInput(inputString.getBytes()); in testSetDictionary$B()
930 infl1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B()
939 infl2.setDictionary(dictionary2.getBytes()); in testSetDictionary$B()
949 infl1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B()
[all …]
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/
DString2Test.java59 assertTrue("Failed to create string", new String(hw1.getBytes()) in test_Constructor$B()
80 assertTrue("Failed to create string", new String(hw1.getBytes(), 0, hw1 in test_Constructor$BII()
81 .getBytes().length).equals(hw1)); in test_Constructor$BII()
353 byte[] sbytes = hw1.getBytes(); in test_getBytes()
368 result = string.getBytes("8859_1"); in test_getBytes()
382 result = string.getBytes("UTF8"); in test_getBytes()
432 "Hello World".getBytes(6, 11, buf, 0); in test_getBytesII$BI()
436 "Hello World".getBytes(-1, 1, null, 0); in test_getBytesII$BI()
449 byte[] buf = "Hello World".getBytes(); in test_getBytesLjava_lang_String()
453 "string".getBytes("8849_1"); in test_getBytesLjava_lang_String()
[all …]
/external/mockwebserver/src/main/java/com/google/mockwebserver/
DMockResponse.java127 return setBody(body.getBytes(ASCII)); in setBody()
141 bytesOut.write(Integer.toHexString(chunkSize).getBytes(ASCII)); in setChunkedBody()
142 bytesOut.write("\r\n".getBytes(ASCII)); in setChunkedBody()
144 bytesOut.write("\r\n".getBytes(ASCII)); in setChunkedBody()
147 bytesOut.write("0\r\n\r\n".getBytes(ASCII)); // last chunk + empty trailer + crlf in setChunkedBody()
153 return setChunkedBody(body.getBytes(ASCII), maxChunkSize); in setChunkedBody()
/external/apache-http/src/org/apache/http/util/
DEncodingUtils.java105 public static byte[] getBytes(final String data, final String charset) { in getBytes() method in EncodingUtils
116 return data.getBytes(charset); in getBytes()
118 return data.getBytes(); in getBytes()
135 return data.getBytes(HTTP.US_ASCII); in getAsciiBytes()
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/
DPropertyResourceBundleTest.java46 "p1=one\ncharset=iso-8859-1".getBytes("ISO-8859-1")); in test_ConstructorLjava_io_InputStream()
53 .getBytes("UTF-8")); in test_ConstructorLjava_io_InputStream()
76 .getBytes("ISO-8859-1"))); in test_ConstructorLjava_io_Reader()
86 cbuffer = charset.decode(ByteBuffer.wrap(content.getBytes("UTF-8"))); in test_ConstructorLjava_io_Reader()
151 "p1=one\np2=two".getBytes("ISO-8859-1")); in setUp()
183 "p3=three\np4=four".getBytes()); in test_access$0_Enumeration()
DPropertiesTest.java224 prop.load(new ByteArrayInputStream("=".getBytes())); in test_loadLjava_io_InputStream()
232 prop.load(new ByteArrayInputStream(" = ".getBytes())); in test_loadLjava_io_InputStream()
240 prop.load(new ByteArrayInputStream(" a= b".getBytes())); in test_loadLjava_io_InputStream()
248 prop.load(new ByteArrayInputStream(" a b".getBytes())); in test_loadLjava_io_InputStream()
257 .getBytes("ISO8859_1"))); in test_loadLjava_io_InputStream()
268 .getBytes("ISO8859_1"))); in test_loadLjava_io_InputStream()
328 prop.load(new ByteArrayInputStream("=".getBytes())); in test_loadLjava_io_Reader()
332 prop.load(new ByteArrayInputStream(" = ".getBytes())); in test_loadLjava_io_Reader()
336 prop.load(new ByteArrayInputStream(" a= b".getBytes())); in test_loadLjava_io_Reader()
340 prop.load(new ByteArrayInputStream(" a b".getBytes())); in test_loadLjava_io_Reader()
[all …]
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/
DSignature2Test.java172 sig.update(MESSAGE.getBytes()); in test_sign()
191 byte[] bytes = MESSAGE.getBytes(); in test_update$B()
202 byte[] bytes = MESSAGE.getBytes(); in test_update$BII()
213 sig.update(MESSAGE.getBytes()[0]); in test_updateB()
222 sig.update(MESSAGE.getBytes()); in test_verify$B()
227 sig.update(MESSAGE.getBytes()); in test_verify$B()
/external/apache-harmony/auth/src/test/java/common/org/apache/harmony/auth/tests/module/
DLoginModuleUtilsTest.java38 .getBytes()); in testGetPassword()
43 in = new ByteArrayInputStream(password_file_content.getBytes()); in testGetPassword()
48 in = new ByteArrayInputStream(password_file_content.getBytes()); in testGetPassword()
53 in = new ByteArrayInputStream(password_file_content.getBytes()); in testGetPassword()
58 in = new ByteArrayInputStream(password_file_content.getBytes()); in testGetPassword()
/external/apache-harmony/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/
DManifestTest.java89 MANIFEST_CONTENTS.getBytes("ISO-8859-1"))); in testCopyingConstructor()
137 MANIFEST_CONTENTS.getBytes("ISO-8859-1"))); in testStreamConstructor()
145 .getBytes("ISO-8859-1")); in testStreamConstructor()
161 MANIFEST_CONTENTS_2.getBytes("ISO-8859-1"))); in testStreamConstructor()
188 MANIFEST_CONTENTS.getBytes("ISO-8859-1"))); in testEquals()
190 MANIFEST_CONTENTS.getBytes("ISO-8859-1"))); in testEquals()
195 MANIFEST_CONTENTS_1.getBytes("ISO-8859-1"))); in testEquals()
270 byte[] bytes = manifestContent.getBytes("ISO-8859-1"); in testNul()
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/
DSFTPv3Client.java298 sendMessage(Packet.SSH_FXP_CLOSE, req_id, tw.getBytes()); in closeHandle()
386 sendMessage(Packet.SSH_FXP_FSTAT, req_id, tw.getBytes()); in fstat()
425 sendMessage(statMethod, req_id, tw.getBytes()); in statBoth()
501 sendMessage(Packet.SSH_FXP_READLINK, req_id, tw.getBytes()); in readLink()
588 sendMessage(Packet.SSH_FXP_SETSTAT, req_id, tw.getBytes()); in setstat()
613 sendMessage(Packet.SSH_FXP_FSETSTAT, req_id, tw.getBytes()); in fsetstat()
639 sendMessage(Packet.SSH_FXP_SYMLINK, req_id, tw.getBytes()); in createSymlink()
661 sendMessage(Packet.SSH_FXP_REALPATH, req_id, tw.getBytes()); in canonicalPath()
713 sendMessage(Packet.SSH_FXP_READDIR, req_id, tw.getBytes()); in scanDirectory()
775 sendMessage(Packet.SSH_FXP_OPENDIR, req_id, tw.getBytes()); in openDirectory()
[all …]

1234567891011