Home
last modified time | relevance | path

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

12345678910

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DCertificatesToPlayWith.java76 "-----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/harmony-tests/src/test/java/org/apache/harmony/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 …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/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()
/libcore/luni/src/test/java/libcore/java/lang/
DStringTest.java94 s.getBytes(EVIL_CHARSET); in testGetBytes_MaliciousCharset()
102 byte[] bytes = "xa\u0666bx".getBytes("UTF-8"); in testString_BII()
107 byte[] bytes = "xa\u0666bx".getBytes("UTF-8"); in testString_BIIString()
112 byte[] bytes = "xa\u0666bx".getBytes("UTF-8"); in testString_BIICharset()
117 byte[] bytes = "a\u0666b".getBytes("UTF-8"); in testString_BCharset()
134 assertEquals("[97, 63, 98]", Arrays.toString("a\u0666b".getBytes("US-ASCII"))); in test_getBytes_bad()
135 … assertEquals("[97, 63, 98]", Arrays.toString("a\u0666b".getBytes(Charset.forName("US-ASCII")))); in test_getBytes_bad()
143 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8()
146 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8()
147 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8()
[all …]
/libcore/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()
/libcore/luni/src/test/java/libcore/java/net/
DOldDatagramPacketTest.java28 … 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/luni/src/test/java/libcore/java/io/
DOldPushbackInputStreamTest.java37 .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 …]
DOldPipedOutputStreamTest.java161 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()
DOldAndroidBufferedInputStreamTest.java33 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()
DOldBufferedOutputStreamTest.java42 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()
DOldAndroidByteArrayInputStreamTest.java33 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()
DOldAndroidPushbackInputStreamTest.java30 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/ojluni/src/main/java/java/lang/
DProcessEnvironment.java136 public byte[] getBytes() { in getBytes() method in ProcessEnvironment.ExternalData
146 && arrayEquals(getBytes(), ((ExternalData) o).getBytes()); in equals()
150 return arrayHash(getBytes()); in hashCode()
166 return new Variable(str, str.getBytes()); in valueOfQueryOnly()
179 return arrayCompare(getBytes(), variable.getBytes()); in compareTo()
199 return new Value(str, str.getBytes()); in valueOfQueryOnly()
212 return arrayCompare(getBytes(), value.getBytes()); in compareTo()
273 count += entry.getKey().getBytes().length; in toEnvironmentBlock()
274 count += entry.getValue().getBytes().length; in toEnvironmentBlock()
281 byte[] key = entry.getKey ().getBytes(); in toEnvironmentBlock()
[all …]
/libcore/luni/src/test/java/tests/targets/security/cert/
DCertificateTest.java608 .getBytes())); in testVerifyMD5()
621 .getBytes())); in testVerifyMD2()
714 selfSignedCertMD2.getBytes())); in getCertList()
717 signedCert1Chain1.getBytes())); in getCertList()
720 signedCert2Chain1.getBytes())); in getCertList()
724 selfSignedCertMD5.getBytes())); in getCertList()
727 signedCert1Chain2.getBytes())); in getCertList()
730 signedCert2Chain2.getBytes())); in getCertList()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DString2Test.java58 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/luni/src/test/java/libcore/dalvik/system/
DBlockGuardTest.java114 fos.write("01234567890".getBytes()); in testFileInputStream()
200 fos.write("a".getBytes()); in testUnbufferedIO()
221 ras.read("a".getBytes()); in testUnbufferedIO()
232 ras.write("a".getBytes()); in testUnbufferedIO()
234 ras.read("a".getBytes()); in testUnbufferedIO()
247 ras.read("a".getBytes()); in testUnbufferedIO()
256 ras.write("a".getBytes()); in testUnbufferedIO()
267 ras.read("a".getBytes()); in testUnbufferedIO()
269 ras.write("a".getBytes()); in testUnbufferedIO()
280 ras.write("a".getBytes()); in testUnbufferedIO()
/libcore/harmony-tests/src/test/java/org/apache/harmony/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.java225 prop.load(new ByteArrayInputStream("=".getBytes())); in test_loadLjava_io_InputStream()
233 prop.load(new ByteArrayInputStream(" = ".getBytes())); in test_loadLjava_io_InputStream()
241 prop.load(new ByteArrayInputStream(" a= b".getBytes())); in test_loadLjava_io_InputStream()
249 prop.load(new ByteArrayInputStream(" a b".getBytes())); in test_loadLjava_io_InputStream()
258 .getBytes("ISO8859_1"))); in test_loadLjava_io_InputStream()
269 .getBytes("ISO8859_1"))); in test_loadLjava_io_InputStream()
329 prop.load(new ByteArrayInputStream("=".getBytes())); in test_loadLjava_io_Reader()
333 prop.load(new ByteArrayInputStream(" = ".getBytes())); in test_loadLjava_io_Reader()
337 prop.load(new ByteArrayInputStream(" a= b".getBytes())); in test_loadLjava_io_Reader()
341 prop.load(new ByteArrayInputStream(" a b".getBytes())); in test_loadLjava_io_Reader()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DStringToBytesBenchmark.java50 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/luni/src/test/java/libcore/java/nio/channels/
DFileChannelTest.java91 fc.write(ByteBuffer.wrap("abcdABCD".getBytes("US-ASCII"))); in test_readv()
113 buffers[0].put("abcd".getBytes("US-ASCII")).flip(); in test_writev()
114 buffers[1].put("ABCD".getBytes("US-ASCII")).flip(); in test_writev()
126 fc.write(ByteBuffer.wrap("hello".getBytes("US-ASCII"))); in test_append()
131 fc.write(ByteBuffer.wrap(" world".getBytes("US-ASCII"))); in test_append()
138 byte[] initialBytes = "12345".getBytes("US-ASCII"); in test_position_writeAddsPadding()
147 byte[] newBytes = "6789A".getBytes("US-ASCII"); in test_position_writeAddsPadding()
158 byte[] initialBytes = "12345".getBytes("US-ASCII"); in test_truncate_greaterThanSizeWithPositionChange()
180 byte[] initialBytes = "123456789A".getBytes("US-ASCII"); in test_truncate_greaterThanSizeWithoutPositionChange()
200 byte[] initialBytes = "123456789A".getBytes("US-ASCII"); in test_truncate_lessThanSizeWithPositionChange()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DZipOutputStreamTest.java73 zos.write("Hello World".getBytes("UTF-8")); in test_closeEntry()
86 zos.write("Hello World".getBytes()); in test_finish()
109 zos.write("Hello World".getBytes()); in test_putNextEntryLjava_util_zip_ZipEntry()
152 zos.write(data.getBytes()); in test_setLevelI()
157 zos.write(data.getBytes()); in test_setLevelI()
169 tempCrc.update(data.getBytes()); in test_setMethodI()
173 zos.write(data.getBytes()); in test_setMethodI()
178 zos.write(data.getBytes()); in test_setMethodI()
193 zos.write(data.getBytes()); in test_write$BII()
312 zos.write(data.getBytes()); in test_timeSerializationRounding()
[all …]
DInflaterTest.java795 byte[] input = inputString.getBytes("UTF-8"); in test_getBytesRead()
823 byte[] input = inputString.getBytes("UTF-8"); in test_getBytesWritten()
895 defDict1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B()
896 defDict2.setDictionary(dictionary2.getBytes()); in testSetDictionary$B()
898 defDictNo.setInput(inputString.getBytes()); in testSetDictionary$B()
899 defDict1.setInput(inputString.getBytes()); in testSetDictionary$B()
900 defDict2.setInput(inputString.getBytes()); in testSetDictionary$B()
965 infl1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B()
974 infl2.setDictionary(dictionary2.getBytes()); in testSetDictionary$B()
984 infl1.setDictionary(dictionary1.getBytes()); in testSetDictionary$B()
[all …]
/libcore/luni/src/test/java/tests/security/cert/
DPKIXBuilderParametersTest.java240 .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()

12345678910