/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | ByteArrayOutputStreamTest.java | 35 ByteArrayOutputStream bos = null; field in ByteArrayOutputStreamTest 45 bos.close(); in tearDown() 55 bos = new ByteArrayOutputStream(100); in test_ConstructorI() 56 assertEquals("Failed to create stream", 0, bos.size()); in test_ConstructorI() 63 bos = new ByteArrayOutputStream(); in test_Constructor() 64 assertEquals("Failed to create stream", 0, bos.size()); in test_Constructor() 93 bos = new java.io.ByteArrayOutputStream(); in test_reset() 94 bos.write(fileString.getBytes(), 0, 100); in test_reset() 95 bos.reset(); in test_reset() 96 assertEquals("reset failed", 0, bos.size()); in test_reset() [all …]
|
D | BufferedOutputStreamTest.java | 150 BufferedOutputStream bos = new BufferedOutputStream(mos, 3); in test_write$BII() local 151 bos.write("a".getBytes()); in test_write$BII() 152 bos.write("bcde".getBytes()); in test_write$BII() 156 bos = new BufferedOutputStream(mos, 3); in test_write$BII() 157 bos.write("ab".getBytes()); in test_write$BII() 158 bos.write("cd".getBytes()); in test_write$BII() 166 OutputStream bos = new BufferedOutputStream(new ByteArrayOutputStream()); in test_write_$BII_Exception() local 171 bos.write(nullByteArray, -1, -1); in test_write_$BII_Exception() 178 bos.write(nullByteArray, -1, 0); in test_write_$BII_Exception() 185 bos.write(nullByteArray, -1, 1); in test_write_$BII_Exception() [all …]
|
D | PrintStreamTest.java | 42 ByteArrayOutputStream bos = new ByteArrayOutputStream(); field in PrintStreamTest 119 PrintStream os = new PrintStream(bos); in test_ConstructorLjava_io_OutputStream() 125 os = new PrintStream(bos, true, null); in test_ConstructorLjava_io_OutputStream() 136 PrintStream os = new PrintStream(bos); in test_ConstructorLjava_io_OutputStreamZ() 139 assertTrue("Bytes not written", bos.size() > 0); in test_ConstructorLjava_io_OutputStreamZ() 156 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStreamZLjava_lang_String() local 157 PrintStream printStream = new PrintStream(bos, true /* autoFlush */, "utf-8"); in test_ConstructorLjava_io_OutputStreamZLjava_lang_String() 161 bos.toByteArray()); in test_ConstructorLjava_io_OutputStreamZLjava_lang_String() 165 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStreamZLjava_lang_String() local 166 PrintStream printStream = new PrintStream(bos, true /* autoFlush */, "utf-16"); in test_ConstructorLjava_io_OutputStreamZLjava_lang_String() [all …]
|
D | FilterOutputStreamTest.java | 34 ByteArrayOutputStream bos; field in FilterOutputStreamTest 46 bos = new ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStream() 47 os = new FilterOutputStream(bos); in test_ConstructorLjava_io_OutputStream() 55 bos = new ByteArrayOutputStream(); in test_close() 56 os = new FilterOutputStream(bos); in test_close() 59 assertEquals("Bytes not written after flush", 500, bos.size()); in test_close() 90 bos = new ByteArrayOutputStream(); in test_flush() 91 os = new FilterOutputStream(bos); in test_flush() 94 assertEquals("Bytes not written after flush", 500, bos.size()); in test_flush() 102 bos = new ByteArrayOutputStream(); in test_write$B() [all …]
|
D | ObjectOutputStream2Test.java | 48 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in test_writeReadEnum() local 49 ObjectOutputStream os = new ObjectOutputStream(bos); in test_writeReadEnum() 53 ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); in test_writeReadEnum()
|
D | DataOutputStreamTest.java | 32 private ByteArrayOutputStream bos; field in DataOutputStreamTest 237 dis = new DataInputStream(new ByteArrayInputStream(bos.toByteArray())); in openDataInputStream() 245 bos = new ByteArrayOutputStream(); in setUp() 246 os = new DataOutputStream(bos); in setUp()
|
D | DataInputStreamTest.java | 34 private ByteArrayOutputStream bos; field in DataInputStreamTest 617 dis = new DataInputStream(new ByteArrayInputStream(bos.toByteArray())); in openDataInputStream() 625 bos = new ByteArrayOutputStream(); in setUp() 626 os = new DataOutputStream(bos); in setUp()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldByteArrayOutputStreamTest.java | 34 ByteArrayOutputStream bos = null; field in OldByteArrayOutputStreamTest 39 bos = new java.io.ByteArrayOutputStream(100); in test_ConstructorI() 40 assertEquals("Test 1: Failed to create stream;", 0, bos.size()); in test_ConstructorI() 43 bos = new ByteArrayOutputStream(-1); in test_ConstructorI() 51 bos = new ByteArrayOutputStream(); in test_toStringLjava_lang_String() 53 bos.write(fileString.getBytes(), 0, fileString.length()); in test_toStringLjava_lang_String() 55 bos.toString("8859_1").equals(fileString)); in test_toStringLjava_lang_String() 57 bos.toString("8859_2").equals(fileString)); in test_toStringLjava_lang_String() 60 bos.toString("NotAnEcoding"); in test_toStringLjava_lang_String() 69 bos = new ByteArrayOutputStream(); in test_write$BII_Exception() [all …]
|
D | OldOutputStreamTest.java | 54 BasicOutputStream bos = new BasicOutputStream(); in test_write$B() local 59 bos.write(shortByteArray); in test_write$B() 65 buffer = bos.getBuffer(); in test_write$B() 73 bos.write(longByteArray); in test_write$B() 79 BasicOutputStream bos = new BasicOutputStream(); in test_write$BII() local 84 bos.write(shortByteArray, 6, 5); in test_write$BII() 90 buffer = bos.getBuffer(); in test_write$BII() 98 bos.write(longByteArray, 5, 20); in test_write$BII() 103 bos.write(longByteArray, -1, 10); in test_write$BII() 112 bos.write(longByteArray, 10, -1); in test_write$BII() [all …]
|
D | OldDataOutputStreamTest.java | 34 private ByteArrayOutputStream bos; field in OldDataOutputStreamTest 47 BufferedOutputStream buf = new BufferedOutputStream(bos); in test_flush() 52 bos.toByteArray().length == 0); in test_flush() 55 bos.toByteArray().length > 0); in test_flush() 180 dis = new DataInputStream(new ByteArrayInputStream(bos.toByteArray())); in openDataInputStream() 185 bos = new ByteArrayOutputStream(); in setUp() 186 os = new DataOutputStream(bos); in setUp()
|
D | OldFilterOutputStreamTest.java | 30 java.io.ByteArrayOutputStream bos; field in OldFilterOutputStreamTest 44 bos = new ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStream() 45 os = new FilterOutputStream(bos); in test_ConstructorLjava_io_OutputStream() 194 if (bos != null) in tearDown() 195 bos.close(); in tearDown()
|
D | OldBufferedOutputStreamTest.java | 122 OutputStream bos = new BufferedOutputStream(new ByteArrayOutputStream()); in test_write$BII_Exception() local 127 bos.write(nullByteArray, 0, 1); in test_write$BII_Exception() 134 bos.write(byteArray, -1, 1); in test_write$BII_Exception() 141 bos.write(byteArray, 0, -1); in test_write$BII_Exception() 148 bos.write(byteArray, 1, 10); in test_write$BII_Exception()
|
D | OldDataInputStreamTest.java | 34 private ByteArrayOutputStream bos; field in OldDataInputStreamTest 354 dis = new DataInputStream(new ByteArrayInputStream(bos.toByteArray())); in openDataInputStream() 362 bos = new ByteArrayOutputStream(); in setUp() 363 os = new DataOutputStream(bos); in setUp()
|
D | OldInputStreamReaderTest.java | 51 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in setUp() local 52 OutputStreamWriter osw = new OutputStreamWriter(bos); in setUp() 57 fis = new ByteArrayInputStream(bos.toByteArray()); in setUp()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | DigestOutputStreamTest.java | 148 ByteArrayOutputStream bos = new ByteArrayOutputStream(MY_MESSAGE_LEN); in testWriteint01() local 149 DigestOutputStream dos = new DigestOutputStream(bos, md); in testWriteint01() 154 assertTrue("write", Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray())); in testWriteint01() 180 ByteArrayOutputStream bos = new ByteArrayOutputStream(MY_MESSAGE_LEN); in testWriteint02() local 181 DigestOutputStream dos = new DigestOutputStream(bos, md); in testWriteint02() 191 assertTrue("write", Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray())); in testWriteint02() 264 ByteArrayOutputStream bos = new ByteArrayOutputStream(MY_MESSAGE_LEN); in testWriteint05() local 265 DigestOutputStream dos = new DigestOutputStream(bos, null); in testWriteint05() 273 assertTrue(Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray())); in testWriteint05() 286 ByteArrayOutputStream bos = new ByteArrayOutputStream(MY_MESSAGE_LEN); in test_write$BII_1() local [all …]
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldMemoryHandlerTest.java | 55 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in propertiesToInputStream() local 56 p.store(bos, ""); in propertiesToInputStream() 57 return new ByteArrayInputStream(bos.toByteArray()); in propertiesToInputStream()
|
/libcore/support/src/test/java/tests/util/ |
D | SerializationTester.java | 47 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in getDeserilizedObject() local 48 ObjectOutputStream oos = new ObjectOutputStream(bos); in getDeserilizedObject() 52 ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); in getDeserilizedObject()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | HashtableTest.java | 149 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in test_deserializedArrayLength() local 150 try (ObjectOutputStream oos = new ObjectOutputStream(bos)) { in test_deserializedArrayLength() 155 new ByteArrayInputStream(bos.toByteArray())).readObject(); in test_deserializedArrayLength()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | ZipOutputStreamTest.java | 112 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in testPutNextEntryUsingCurrentTime() local 113 try (ZipOutputStream out = new ZipOutputStream(bos)) { in testPutNextEntryUsingCurrentTime() 127 try (ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(bos.toByteArray()))) { in testPutNextEntryUsingCurrentTime()
|
D | OldZipInputStreamTest.java | 44 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in setUp() local 45 ZipOutputStream zos = new ZipOutputStream(bos); in setUp()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | ZipOutputStreamTest.java | 45 ByteArrayOutputStream bos; field in ZipOutputStreamTest 112 zis = new ZipInputStream(new ByteArrayInputStream(bos.toByteArray())); in test_putNextEntryLjava_util_zip_ZipEntry() 197 zis = new ZipInputStream(new ByteArrayInputStream(bos.toByteArray())); in test_write$BII() 317 try (ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(bos.toByteArray()))) { in test_timeSerializationRounding() 394 try (ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(bos.toByteArray()))) { in test_exttSupport() 410 zos = new ZipOutputStream(bos = new ByteArrayOutputStream()); in setUp()
|
D | ZipInputStreamTest.java | 58 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in setUp() local 59 ZipOutputStream zos = new ZipOutputStream(bos); in setUp() 65 zipBytes = bos.toByteArray(); in setUp()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationMember.java | 310 ByteArrayOutputStream bos = new ByteArrayOutputStream( in rethrowError() local 312 ObjectOutputStream oos = new ObjectOutputStream(bos); in rethrowError() 316 ByteArrayInputStream bis = new ByteArrayInputStream(bos in rethrowError()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | SealedObjectTest.java | 73 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in testReadObject() local 74 ObjectOutputStream oos = new ObjectOutputStream(bos); in testReadObject() 78 bos.toByteArray())); in testReadObject()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/ |
D | SerializedLambdaTest.java | 86 ByteArrayOutputStream bos = new ByteArrayOutputStream(); in serialize() local 87 ObjectOutputStream oos = new ObjectOutputStream(bos); in serialize() 90 return bos.toByteArray(); in serialize()
|