Home
last modified time | relevance | path

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

12

/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()
DOldOutputStreamWriterTest.java340 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_write$CII() local
411 writer = new OutputStreamWriter(baos, "utf-8"); in test_write$CII()
416 "hi", baos.toString("utf-8")); in test_write$CII()
422 "hi" + testString, baos.toString("utf-8")); in test_write$CII()
485 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_writeLjava_lang_StringII() local
559 writer = new OutputStreamWriter(baos, "utf-8"); in test_writeLjava_lang_StringII()
565 "bc", baos.toString("utf-8")); in test_writeLjava_lang_StringII()
571 "bc" + testString, baos.toString("utf-8")); in test_writeLjava_lang_StringII()
DOldObjectOutputStreamTest.java330 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_writeStreamHeader() local
335 boos = new BasicObjectOutputStream(baos); in test_writeStreamHeader()
341 buffer = baos.toByteArray(); in test_writeStreamHeader()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DPropertiesTest.java148 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_listLjava_io_PrintStream() local
149 PrintStream ps = new PrintStream(baos); in test_listLjava_io_PrintStream()
157 String propList = baos.toString(); in test_listLjava_io_PrintStream()
178 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_listLjava_io_PrintWriter() local
179 PrintWriter pw = new PrintWriter(baos); in test_listLjava_io_PrintWriter()
187 String propList = baos.toString(); in test_listLjava_io_PrintWriter()
962 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStore_scenario0() local
964 props.store(baos, comment1 + '\r' + comment2); in testStore_scenario0()
966 baos.toByteArray()); in testStore_scenario0()
967 baos.close(); in testStore_scenario0()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DObjectInputStream2Test.java40 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_readUnshared() local
42 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_readUnshared()
48 new ByteArrayInputStream(baos.toByteArray())); in test_readUnshared()
65 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_readObject_Hierarchy() local
67 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_readObject_Hierarchy()
72 baos.toByteArray())); in test_readObject_Hierarchy()
194 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_resolveClass_invalidClassName() local
195 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_resolveClass_invalidClassName()
202 byte[] bytes = baos.toByteArray(); in test_resolveClass_invalidClassName()
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/benchmarks/src/benchmarks/regression/
DSerializationBenchmark.java28 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in bytes() local
29 ObjectOutputStream out = new ObjectOutputStream(baos); in bytes()
32 return baos.toByteArray(); in bytes()
85 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in timeWriteNoObjects() local
86 ObjectOutputStream out = new ObjectOutputStream(baos); in timeWriteNoObjects()
89 baos.reset(); in timeWriteNoObjects()
106 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in writeSingleObject() local
107 ObjectOutputStream out = new ObjectOutputStream(baos); in writeSingleObject()
111 baos.reset(); in writeSingleObject()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DManifestTest.java130 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStreamConstructor() local
131 m.write(baos); in testStreamConstructor()
132 InputStream is = new ByteArrayInputStream(baos.toByteArray()); in testStreamConstructor()
246 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWrite() local
257 m.write(baos); // ok in testWrite()
419 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testDecoding() local
420 m.write(baos); in testDecoding()
421 m = new Manifest(new ByteArrayInputStream(baos.toByteArray())); in testDecoding()
/libcore/luni/src/main/java/java/security/
DSignedObject.java76 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in SignedObject() local
77 ObjectOutputStream oos = new ObjectOutputStream(baos); in SignedObject()
85 content = baos.toByteArray(); in SignedObject()
/libcore/luni/src/test/java/libcore/java/util/prefs/
DPreferencesTest.java95 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testHtmlEncoding() local
96 p.exportNode(baos); in testHtmlEncoding()
98 String s = new String(baos.toByteArray(), "UTF-8"); in testHtmlEncoding()
DOldAbstractPreferencesTest.java981 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testExportNode() local
983 pref.exportNode(baos); in testExportNode()
984 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testExportNode()
990 String xmlData = new String(baos.toByteArray()); in testExportNode()
1031 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testExportSubtree() local
1033 pref.exportSubtree(baos); in testExportSubtree()
1034 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testExportSubtree()
1042 String xmlData = new String(baos.toByteArray()); in testExportSubtree()
/libcore/luni/src/test/java/libcore/java/security/cert/
DCertificateFactoryTest.java215 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_generateCertificate_AnyLineLength_Success() local
216 baos.write(VALID_CERTIFICATE_PEM_HEADER); in test_generateCertificate_AnyLineLength_Success()
223 baos.write(Arrays.copyOfRange(VALID_CERTIFICATE_PEM_DATA, offset, end)); in test_generateCertificate_AnyLineLength_Success()
224 baos.write('\n'); in test_generateCertificate_AnyLineLength_Success()
227 baos.write(VALID_CERTIFICATE_PEM_FOOTER); in test_generateCertificate_AnyLineLength_Success()
230 cf.generateCertificate(new ByteArrayInputStream(baos.toByteArray())); in test_generateCertificate_AnyLineLength_Success()
235 baos.reset(); in test_generateCertificate_AnyLineLength_Success()
236 baos.write(VALID_CERTIFICATE_PEM_HEADER); in test_generateCertificate_AnyLineLength_Success()
500 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testCertPathEncoding() local
501 ObjectOutputStream oos = new ObjectOutputStream(baos); in testCertPathEncoding()
[all …]
/libcore/luni/src/test/java/libcore/java/util/zip/
DDeflaterOutputStreamTest.java117 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSyncFlushDeflater() local
118 DeflaterOutputStream dos = new DeflaterOutputStream(baos, def, deflaterBufferSize); in testSyncFlushDeflater()
128 byte[] compressed = baos.toByteArray(); in testSyncFlushDeflater()
DZipFileTest.java105 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testDuplicateEntries() local
106 ZipOutputStream out = new ZipOutputStream(baos); in testDuplicateEntries()
114 byte[] buffer = baos.toByteArray(); in testDuplicateEntries()
134 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoredEntrySize() local
135 ZipOutputStream out = new ZipOutputStream(baos); in testStoredEntrySize()
154 byte[] outBuffer = baos.toByteArray(); in testStoredEntrySize()
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/io/
DObjectInputStreamTest.java154 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_ClassDescriptor() local
156 baos); in test_ClassDescriptor()
160 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in test_ClassDescriptor()
1082 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_resolveClass() local
1083 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_resolveClass()
1086 byte[] bytes = baos.toByteArray(); in test_resolveClass()
1122 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_resolveObjectLjava_lang_Object() local
1123 ObjectOutputStream oos = new ObjectOutputStream(baos); in test_resolveObjectLjava_lang_Object()
1129 byte[] bytes = baos.toByteArray(); in test_resolveObjectLjava_lang_Object()
1143 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_readClassDescriptor() local
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DSystemTest.java51 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testLineSeparator() local
52 new PrintStream(baos).println(); in testLineSeparator()
53 assertEquals(System.lineSeparator(), new String(baos.toByteArray(), "UTF-8")); in testLineSeparator()
DOldThreadTest.java74 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_dumpStack() local
75 System.setErr(new PrintStream(baos)); in test_dumpStack()
79 String s = new String(baos.toByteArray()); in test_dumpStack()
/libcore/luni/src/test/java/libcore/java/util/jar/
DOldManifestTest.java116 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_writeLjava_io_OutputStream() local
118 manifest1.write(baos); in test_writeLjava_io_OutputStream()
120 b = baos.toByteArray(); in test_writeLjava_io_OutputStream()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DGZIPInputStreamTest.java205 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_read$BII() local
206 GZIPOutputStream zipout = new GZIPOutputStream(baos); in test_read$BII()
210 GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(baos.toByteArray())); in test_read$BII()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DCipherOutputStream1Test.java195 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in test_ConstructorLjava_io_OutputStreamLjavax_crypto_Cipher() local
204 CipherOutputStream cos = new CipherOutputStream(baos, c); in test_ConstructorLjava_io_OutputStreamLjavax_crypto_Cipher()
DSealedObjectTest.java182 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testGetAlgorithmAfterSerialization() local
183 ObjectOutputStream oos = new ObjectOutputStream(baos); in testGetAlgorithmAfterSerialization()
187 ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray())); in testGetAlgorithmAfterSerialization()

12