Home
last modified time | relevance | path

Searched refs:baos (Results 1 – 25 of 59) sorted by relevance

123

/libcore/luni/src/test/java/libcore/java/io/
DOldBufferedOutputStreamTest.java30 java.io.ByteArrayOutputStream baos; field in OldBufferedOutputStreamTest
40 baos = new java.io.ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStream()
41 os = new java.io.BufferedOutputStream(baos); in test_ConstructorLjava_io_OutputStream()
50 baos = new java.io.ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStreamI()
53 os = new java.io.BufferedOutputStream(baos, -1); in test_ConstructorLjava_io_OutputStreamI()
59 os = new java.io.BufferedOutputStream(baos, 1024); in test_ConstructorLjava_io_OutputStreamI()
67 baos = new ByteArrayOutputStream(); in test_flush()
68 os = new java.io.BufferedOutputStream(baos, 600); in test_flush()
72 500, ((ByteArrayOutputStream) baos).size()); in test_flush()
89 baos = new java.io.ByteArrayOutputStream(),512); in test_write$BII()
[all …]
DOldObjectOutputStreamPutFieldTest.java75 ByteArrayOutputStream baos; in test_put() local
82 baos = new ByteArrayOutputStream(refContent.length); in test_put()
83 oos = new ObjectOutputStream(baos); in test_put()
86 content = baos.toByteArray(); in test_put()
100 ByteArrayOutputStream baos; in test_writeLjava_io_ObjectOutputStream() local
107 baos = new ByteArrayOutputStream(refContent.length); in test_writeLjava_io_ObjectOutputStream()
108 oos = new ObjectOutputStream(baos); in test_writeLjava_io_ObjectOutputStream()
111 content = baos.toByteArray(); in test_writeLjava_io_ObjectOutputStream()
DOutputStreamWriterTest.java53 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testFlush() local
54 OutputStreamWriter writer = new OutputStreamWriter(baos, "UTF-32BE"); in testFlush()
60 assertEquals(8192, baos.size()); // Just the 'x's so far. in testFlush()
66 byte[] bytes = baos.toByteArray(); in testFlush()
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKLocalTimeSerialization.java96 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_h() local
97 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_h()
101 byte[] bytes = baos.toByteArray(); in test_serialization_format_h()
107 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_hm() local
108 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_hm()
113 byte[] bytes = baos.toByteArray(); in test_serialization_format_hm()
119 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_hms() local
120 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_hms()
126 byte[] bytes = baos.toByteArray(); in test_serialization_format_hms()
132 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_hmsn() local
[all …]
DTCKZoneOffsetSerialization.java85 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_quarterPositive() local
86 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_quarterPositive()
90 byte[] bytes = baos.toByteArray(); in test_serialization_format_quarterPositive()
96 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_quarterNegative() local
97 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_quarterNegative()
101 byte[] bytes = baos.toByteArray(); in test_serialization_format_quarterNegative()
107 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_full() local
108 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_full()
113 byte[] bytes = baos.toByteArray(); in test_serialization_format_full()
DTCKZonedDateTimeSerialization.java102 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_zoneId() local
103 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_zoneId()
116 byte[] bytes = baos.toByteArray(); in test_serialization_format_zoneId()
123 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format_zoneOffset() local
124 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format_zoneOffset()
137 byte[] bytes = baos.toByteArray(); in test_serialization_format_zoneOffset()
DTCKInstantSerialization.java84 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
85 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
90 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKYearSerialization.java85 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
86 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
90 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKYearMonthSerialization.java93 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
94 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
99 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKMonthDaySerialization.java92 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
93 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
98 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKLocalDateSerialization.java94 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
95 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
101 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKLocalDateTimeSerialization.java87 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
88 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
98 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKZoneIdSerialization.java90 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
91 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
95 byte[] bytes = baos.toByteArray(); in test_serialization_format()
160 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in deserialize() local
161 try (DataOutputStream dos = new DataOutputStream(baos)) { in deserialize()
179 …try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) { in deserialize()
DTCKDurationSerialization.java95 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
96 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
101 byte[] bytes = baos.toByteArray(); in test_serialization_format()
DTCKOffsetTimeSerialization.java97 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
98 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
106 byte[] bytes = baos.toByteArray(); in test_serialization_format()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DPropertiesTest.java151 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_listLjava_io_PrintStream() local
152 PrintStream ps = new PrintStream(baos); in test_listLjava_io_PrintStream()
160 String propList = baos.toString(); in test_listLjava_io_PrintStream()
181 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_listLjava_io_PrintWriter() local
182 PrintWriter pw = new PrintWriter(baos); in test_listLjava_io_PrintWriter()
190 String propList = baos.toString(); in test_listLjava_io_PrintWriter()
965 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStore_scenario0() local
967 props.store(baos, comment1 + '\r' + comment2); in testStore_scenario0()
969 baos.toByteArray()); in testStore_scenario0()
970 baos.close(); in testStore_scenario0()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DObjectInputStream2Test.java45 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_readUnshared() local
47 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_readUnshared()
53 new ByteArrayInputStream(baos.toByteArray())); in test_readUnshared()
70 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_readObject_Hierarchy() local
72 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_readObject_Hierarchy()
77 baos.toByteArray())); in test_readObject_Hierarchy()
199 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_resolveClass_invalidClassName() local
200 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_resolveClass_invalidClassName()
207 byte[] bytes = baos.toByteArray(); in test_resolveClass_invalidClassName()
254 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_sameName() local
[all …]
DObjectStreamFieldTest.java158 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in test_getType_Deserialized() local
159 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_getType_Deserialized()
162 baos.close(); in test_getType_Deserialized()
164 byte[] bytes = baos.toByteArray(); in test_getType_Deserialized()
179 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in test_getType_MockObjectInputStream() local
180 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_getType_MockObjectInputStream()
183 baos.close(); in test_getType_MockObjectInputStream()
185 byte[] bytes = baos.toByteArray(); in test_getType_MockObjectInputStream()
198 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in test_isUnshared() local
199 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_isUnshared()
[all …]
DBufferedOutputStreamTest.java30 java.io.ByteArrayOutputStream baos; field in BufferedOutputStreamTest
40 baos = new java.io.ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStream()
41 os = new java.io.BufferedOutputStream(baos); in test_ConstructorLjava_io_OutputStream()
50 baos = new java.io.ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStreamI()
51 os = new java.io.BufferedOutputStream(baos, 1024); in test_ConstructorLjava_io_OutputStreamI()
102 baos = new ByteArrayOutputStream(); in test_flush()
103 os = new java.io.BufferedOutputStream(baos, 600); in test_flush()
107 ((ByteArrayOutputStream) baos).size()); in test_flush()
132 os = new BufferedOutputStream(baos = new ByteArrayOutputStream(), 512); in test_write$BII()
134 bais = new ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
[all …]
DObjectOutputStreamTest.java971 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in test_writeObject_Exception() local
972 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_writeObject_Exception()
981 baos.close(); in test_writeObject_Exception()
984 byte[] bytes = baos.toByteArray(); in test_writeObject_Exception()
1137 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_writeUnshared() local
1138 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_writeUnshared()
1147 baos.toByteArray())); in test_writeUnshared()
1168 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_writeUnshared2() local
1169 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_writeUnshared2()
1178 baos.toByteArray())); in test_writeUnshared2()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/serial/
DTCKChronoLocalDateSerialization.java119 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization_format() local
120 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_serialization_format()
126 byte[] bytes = baos.toByteArray(); in test_serialization_format()
137 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_hijrahSerialization_format() local
151 baos = new ByteArrayOutputStream(); in test_hijrahSerialization_format()
152 try (DataOutputStream dos = new DataOutputStream(baos) ) { in test_hijrahSerialization_format()
160 byte[] dateBytes = baos.toByteArray(); in test_hijrahSerialization_format()
/libcore/benchmarks/src/benchmarks/regression/
DSerializationBenchmark.java29 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in bytes() local
30 ObjectOutputStream out = new ObjectOutputStream(baos); in bytes()
33 return baos.toByteArray(); in bytes()
86 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in timeWriteNoObjects() local
87 ObjectOutputStream out = new ObjectOutputStream(baos); in timeWriteNoObjects()
90 baos.reset(); in timeWriteNoObjects()
107 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in writeSingleObject() local
108 ObjectOutputStream out = new ObjectOutputStream(baos); in writeSingleObject()
112 baos.reset(); in writeSingleObject()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneRulesSerialization.java88 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in assertSerialization() local
89 ObjectOutputStream out = new ObjectOutputStream(baos); in assertSerialization()
91 baos.close(); in assertSerialization()
92 byte[] bytes = baos.toByteArray(); in assertSerialization()
DTCKFixedZoneRulesSerialization.java102 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_serialization() local
103 ObjectOutputStream out = new ObjectOutputStream(baos); in test_serialization()
105 baos.close(); in test_serialization()
106 byte[] bytes = baos.toByteArray(); in test_serialization()
/libcore/ojluni/src/test/java/time/tck/java/time/
DAbstractTCKTest.java103 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeThenRead() local
104 try (ObjectOutputStream oos = new ObjectOutputStream(baos) ) { in writeThenRead()
107 …try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) { in writeThenRead()
118 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in assertSerializedBySer() local
119 try (ObjectOutputStream oos = new ObjectOutputStream(baos) ) { in assertSerializedBySer()
122 byte[] bytes = baos.toByteArray(); in assertSerializedBySer()
178 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in assertNotSerializable() local
179 try (DataOutputStream out = new DataOutputStream(baos)) { in assertNotSerializable()
192 byte[] bytes = baos.toByteArray(); in assertNotSerializable()

123