/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | CertificatesToPlayWith.java | 76 "-----END CERTIFICATE-----\n").getBytes(); 106 "-----END CERTIFICATE-----\n").getBytes(); 137 "-----END CERTIFICATE-----\n").getBytes(); 169 "-----END CERTIFICATE-----\n").getBytes(); 199 "-----END CERTIFICATE-----\n").getBytes(); 229 "-----END CERTIFICATE-----\n").getBytes(); 261 "-----END CERTIFICATE-----\n").getBytes(); 292 "-----END CERTIFICATE-----\n").getBytes(); 322 "-----END CERTIFICATE-----\n").getBytes(); 354 "-----END CERTIFICATE-----\n").getBytes(); [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 86 s.getBytes(EVIL_CHARSET); in testGetBytes_MaliciousCharset() 94 byte[] bytes = "xa\u0666bx".getBytes("UTF-8"); in testString_BII() 99 byte[] bytes = "xa\u0666bx".getBytes("UTF-8"); in testString_BIIString() 104 byte[] bytes = "xa\u0666bx".getBytes("UTF-8"); in testString_BIICharset() 109 byte[] bytes = "a\u0666b".getBytes("UTF-8"); in testString_BCharset() 126 assertEquals("[97, 63, 98]", Arrays.toString("a\u0666b".getBytes("US-ASCII"))); in test_getBytes_bad() 127 … assertEquals("[97, 63, 98]", Arrays.toString("a\u0666b".getBytes(Charset.forName("US-ASCII")))); in test_getBytes_bad() 135 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8() 138 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8() 139 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | DatagramPacketTest.java | 37 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 …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | ByteArrayOutputStreamTest.java | 94 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()
|
D | PushbackInputStreamTest.java | 66 .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()
|
D | SequenceInputStreamTest.java | 58 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()
|
D | FilterOutputStreamTest.java | 55 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()
|
/libcore/support/src/test/java/org/apache/harmony/testframework/ |
D | SinkTester.java | 49 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()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldDatagramPacketTest.java | 28 … DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5, InetAddress.getLocalHost(), 1000); in test_getPort() 63 new DatagramPacket("Hello".getBytes(), 6); in test_setLengthI() 69 new DatagramPacket("Hello".getBytes(), -1); in test_setLengthI() 76 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5); in test_setData$BII() 85 DatagramPacket dp = new DatagramPacket("Hello".getBytes(), 5); in test_setData$B()
|
/libcore/support/src/test/java/tests/http/ |
D | MockResponse.java | 106 return setBody(body.getBytes(ASCII)); in setBody() 120 bytesOut.write(Integer.toHexString(chunkSize).getBytes(ASCII)); in setChunkedBody() 121 bytesOut.write("\r\n".getBytes(ASCII)); in setChunkedBody() 123 bytesOut.write("\r\n".getBytes(ASCII)); in setChunkedBody() 126 bytesOut.write("0\r\n\r\n".getBytes(ASCII)); // last chunk + empty trailer + crlf in setChunkedBody() 132 return setChunkedBody(body.getBytes(ASCII), maxChunkSize); in setChunkedBody()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldPushbackInputStreamTest.java | 37 .getBytes())); in test_ConstructorLjava_io_InputStream() 38 pis.unread("He".getBytes()); in test_ConstructorLjava_io_InputStream() 49 ByteArrayInputStream bas = new ByteArrayInputStream("Hello".getBytes()); in test_ConstructorLjava_io_InputStreamI() 65 pis.unread("Hello world".getBytes()); in test_ConstructorLjava_io_InputStreamI() 121 fileString.getBytes()[0], pis.read()); in test_read() 126 byte[] buf = ("01234567890123456789").getBytes(); in test_read$BII() 168 byte[] buf = ("01234567890123456789").getBytes(); in test_skipJ() 204 byte[] buf2 = str2.getBytes(); in test_unread$B() 244 byte[] buf2 = (str2 + str2 + str2).getBytes(); in test_unread$BII() 327 .getBytes()[0]); in test_unreadI() [all …]
|
D | OldAndroidBufferedInputStreamTest.java | 33 ByteArrayInputStream aa = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream() 34 ByteArrayInputStream ba = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream() 35 ByteArrayInputStream ca = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream() 36 ByteArrayInputStream da = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream() 37 ByteArrayInputStream ea = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream()
|
D | OldPipedOutputStreamTest.java | 161 out.write(testString.getBytes(), 0, 10); in test_flush() 172 out.write(testString.getBytes(), 0, 5); in test_write$BII() 181 out.write(testString.getBytes(), -1, 10); in test_write$BII() 188 out.write(testString.getBytes(), 0, -1); in test_write$BII() 195 out.write(testString.getBytes(), 5, testString.length()); in test_write$BII() 206 out.write(testString.getBytes(), 0, testString.length()); in test_write$BII() 216 out.write(testString.getBytes(), 0, 5); in test_write$BII()
|
D | OldBufferedOutputStreamTest.java | 42 os.write(fileString.getBytes(), 0, 500); in test_ConstructorLjava_io_OutputStream() 60 os.write(fileString.getBytes(), 0, 500); in test_ConstructorLjava_io_OutputStreamI() 69 os.write(fileString.getBytes(), 0, 500); in test_flush() 90 os.write(fileString.getBytes(), 0, 500); in test_write$BII() 98 os.write(fileString.getBytes(), 500, 513); in test_write$BII() 112 os.write(fileString.getBytes(), 0, 500); in test_write$BII()
|
D | OldAndroidByteArrayInputStreamTest.java | 33 ByteArrayInputStream a = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream() 34 ByteArrayInputStream b = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream() 35 ByteArrayInputStream c = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream() 36 ByteArrayInputStream d = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream()
|
D | OldAndroidPushbackInputStreamTest.java | 30 ByteArrayInputStream aa = new ByteArrayInputStream(str.getBytes()); in testPushbackInputStream() 31 ByteArrayInputStream ba = new ByteArrayInputStream(str.getBytes()); in testPushbackInputStream() 32 ByteArrayInputStream ca = new ByteArrayInputStream(str.getBytes()); in testPushbackInputStream() 36 a.unread("push".getBytes()); in testPushbackInputStream()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | FileChannelTest.java | 71 fc.write(ByteBuffer.wrap("abcdABCD".getBytes("US-ASCII"))); in test_readv() 93 buffers[0].put("abcd".getBytes("US-ASCII")).flip(); in test_writev() 94 buffers[1].put("ABCD".getBytes("US-ASCII")).flip(); in test_writev() 106 fc.write(ByteBuffer.wrap("hello".getBytes("US-ASCII"))); in test_append() 111 fc.write(ByteBuffer.wrap(" world".getBytes("US-ASCII"))); in test_append() 118 byte[] initialBytes = "12345".getBytes("US-ASCII"); in test_position_writeAddsPadding() 127 byte[] newBytes = "6789A".getBytes("US-ASCII"); in test_position_writeAddsPadding() 138 byte[] initialBytes = "12345".getBytes("US-ASCII"); in test_truncate_greaterThanSizeWithPositionChange() 160 byte[] initialBytes = "123456789A".getBytes("US-ASCII"); in test_truncate_greaterThanSizeWithoutPositionChange() 180 byte[] initialBytes = "123456789A".getBytes("US-ASCII"); in test_truncate_lessThanSizeWithPositionChange() [all …]
|
/libcore/luni/src/test/java/tests/targets/security/cert/ |
D | CertificateTest.java | 598 .getBytes())); in testVerifyMD5() 611 .getBytes())); in testVerifyMD2() 704 selfSignedCertMD2.getBytes())); in getCertList() 707 signedCert1Chain1.getBytes())); in getCertList() 710 signedCert2Chain1.getBytes())); in getCertList() 714 selfSignedCertMD5.getBytes())); in getCertList() 717 signedCert1Chain2.getBytes())); in getCertList() 720 signedCert2Chain2.getBytes())); in getCertList()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | ProcessEnvironment.java | 135 public byte[] getBytes() { in getBytes() method in ProcessEnvironment.ExternalData 145 && arrayEquals(getBytes(), ((ExternalData) o).getBytes()); in equals() 149 return arrayHash(getBytes()); in hashCode() 165 return new Variable(str, str.getBytes()); in valueOfQueryOnly() 178 return arrayCompare(getBytes(), variable.getBytes()); in compareTo() 198 return new Value(str, str.getBytes()); in valueOfQueryOnly() 211 return arrayCompare(getBytes(), value.getBytes()); in compareTo() 272 count += entry.getKey().getBytes().length; in toEnvironmentBlock() 273 count += entry.getValue().getBytes().length; in toEnvironmentBlock() 280 byte[] key = entry.getKey ().getBytes(); in toEnvironmentBlock() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | ZipOutputStreamTest.java | 63 zos.write("Hello World".getBytes("UTF-8")); in test_closeEntry() 76 zos.write("Hello World".getBytes()); in test_finish() 99 zos.write("Hello World".getBytes()); in test_putNextEntryLjava_util_zip_ZipEntry() 137 zos.write(data.getBytes()); in test_setLevelI() 142 zos.write(data.getBytes()); in test_setLevelI() 154 tempCrc.update(data.getBytes()); in test_setMethodI() 158 zos.write(data.getBytes()); in test_setMethodI() 163 zos.write(data.getBytes()); in test_setMethodI() 174 zos.write(data.getBytes()); in test_write$BII()
|
D | InflaterTest.java | 770 byte[] input = inputString.getBytes("UTF-8"); in test_getBytesRead() 796 byte[] input = inputString.getBytes("UTF-8"); in test_getBytesWritten() 863 defDict1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B() 864 defDict2.setDictionary(dictionary2.getBytes()); in testSetDictionary$B() 866 defDictNo.setInput(inputString.getBytes()); in testSetDictionary$B() 867 defDict1.setInput(inputString.getBytes()); in testSetDictionary$B() 868 defDict2.setInput(inputString.getBytes()); in testSetDictionary$B() 929 infl1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B() 938 infl2.setDictionary(dictionary2.getBytes()); in testSetDictionary$B() 948 infl1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StringToBytesBenchmark.java | 50 string.value.getBytes(StandardCharsets.UTF_8); in timeGetBytesUtf8() 56 string.value.getBytes(StandardCharsets.ISO_8859_1); in timeGetBytesIso88591() 62 string.value.getBytes(StandardCharsets.US_ASCII); in timeGetBytesAscii()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | String2Test.java | 58 assertTrue("Failed to create string", new String(hw1.getBytes()) in test_Constructor$B() 79 assertTrue("Failed to create string", new String(hw1.getBytes(), 0, hw1 in test_Constructor$BII() 80 .getBytes().length).equals(hw1)); in test_Constructor$BII() 352 byte[] sbytes = hw1.getBytes(); in test_getBytes() 367 result = string.getBytes("8859_1"); in test_getBytes() 381 result = string.getBytes("UTF8"); in test_getBytes() 431 "Hello World".getBytes(6, 11, buf, 0); in test_getBytesII$BI() 435 "Hello World".getBytes(-1, 1, null, 0); in test_getBytesII$BI() 448 byte[] buf = "Hello World".getBytes(); in test_getBytesLjava_lang_String() 452 "string".getBytes("8849_1"); in test_getBytesLjava_lang_String() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | PropertyResourceBundleTest.java | 46 "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()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | PKIXBuilderParametersTest.java | 240 .getBytes()); in testPKIXBuilderParametersKeyStoreCertSelector04() 243 .getBytes()); in testPKIXBuilderParametersKeyStoreCertSelector04() 271 .getBytes()); in testGetMaxPathLength() 274 .getBytes()); in testGetMaxPathLength() 299 .getBytes()); in testSetMaxPathLength() 302 .getBytes()); in testSetMaxPathLength() 342 .getBytes()); in testToString() 345 .getBytes()); in testToString()
|