Home
last modified time | relevance | path

Searched refs:bais (Results 1 – 25 of 27) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/io/
DOldBufferedOutputStreamTest.java32 java.io.ByteArrayInputStream bais; field in OldBufferedOutputStreamTest
91 bais = new java.io.ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
93 0, bais.available()); in test_write$BII()
95 bais = new java.io.ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
97 500, bais.available()); in test_write$BII()
99 bais = new java.io.ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
101 bais.available() >= 1000); in test_write$BII()
103 bais.read(wbytes, 0, 1013); in test_write$BII()
159 bais = new java.io.ByteArrayInputStream(baos.toByteArray()); in test_writeI()
161 0, bais.available()); in test_writeI()
[all …]
DObjectOutputStreamTest.java105 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in roundTrip() local
106 try (ObjectInputStream ois = new ObjectInputStream(bais)) { in roundTrip()
/libcore/ojluni/src/main/java/sun/security/pkcs/
DPKCS7.java258 ByteArrayInputStream bais = null; in parseNetscapeCertChain() local
265 bais = new ByteArrayInputStream(original); in parseNetscapeCertChain()
267 (X509Certificate)certfac.generateCertificate(bais), in parseNetscapeCertChain()
269 bais.close(); in parseNetscapeCertChain()
270 bais = null; in parseNetscapeCertChain()
282 if (bais != null) in parseNetscapeCertChain()
283 bais.close(); in parseNetscapeCertChain()
336 ByteArrayInputStream bais = null; in parseSignedData() local
347 bais = new ByteArrayInputStream(original); in parseSignedData()
349 (X509Certificate)certfac.generateCertificate(bais), in parseSignedData()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/
DInputSourceTest.java51 ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); in testInputSourceInputStream() local
54 InputSource i = new InputSource(bais); in testInputSourceInputStream()
56 assertEquals(bais, i.getByteStream()); in testInputSourceInputStream()
115 ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); in testSetByteStreamGetByteStream() local
120 i.setByteStream(bais); in testSetByteStreamGetByteStream()
122 assertEquals(bais, i.getByteStream()); in testSetByteStreamGetByteStream()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DBufferedOutputStreamTest.java32 java.io.ByteArrayInputStream bais; field in BufferedOutputStreamTest
134 bais = new ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
135 assertEquals("Bytes written, not buffered", 0, bais.available()); in test_write$BII()
137 bais = new ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
138 assertEquals("Bytes not written after flush", 500, bais.available()); in test_write$BII()
140 bais = new ByteArrayInputStream(baos.toByteArray()); in test_write$BII()
142 bais.available() >= 1000); in test_write$BII()
144 bais.read(wbytes, 0, 1013); in test_write$BII()
652 bais = new java.io.ByteArrayInputStream(baos.toByteArray()); in test_writeI()
653 assertEquals("Byte written, not buffered", 0, bais.available()); in test_writeI()
[all …]
DObjectStreamFieldTest.java165 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_getType_Deserialized() local
166 ObjectInputStream ois = new ObjectInputStream(bais); in test_getType_Deserialized()
186 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_getType_MockObjectInputStream() local
187 MockObjectInputStream ois = new MockObjectInputStream(bais); in test_getType_MockObjectInputStream()
204 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_isUnshared() local
205 ObjectInputStream ois = new ObjectInputStream(bais); in test_isUnshared()
237 final ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_ObjectWithPrimitiveField() local
238 final MyObjectInputStream ois = new MyObjectInputStream(bais); in test_ObjectWithPrimitiveField()
DObjectInputStream2Test.java201 ByteArrayInputStream bais; in test_resolveClass_invalidClassName() local
208 bais = new ByteArrayInputStream(bytes); in test_resolveClass_invalidClassName()
209 ois = new TestObjectInputStream(bais); in test_resolveClass_invalidClassName()
/libcore/luni/src/test/java/libcore/java/security/cert/
DX509CertificateTest.java1122 ByteArrayInputStream bais = new ByteArrayInputStream(certsTwice); in generateCertificate_PEM_TrailingData() local
1124 assertEquals(certsBytes.length * 2, bais.available()); in generateCertificate_PEM_TrailingData()
1125 X509Certificate cert1 = (X509Certificate) f.generateCertificate(bais); in generateCertificate_PEM_TrailingData()
1127 assertTrue(certsBytes.length < bais.available()); in generateCertificate_PEM_TrailingData()
1135 ByteArrayInputStream bais = new ByteArrayInputStream(cert1WithTrailing);
1137 assertEquals(cert1Bytes.length * 2, bais.available());
1138 X509Certificate cert1 = (X509Certificate) f.generateCertificate(bais);
1139 assertEquals(cert1Bytes.length, bais.available());
1183 ByteArrayInputStream bais = new ByteArrayInputStream(certsPlusExtra);
1185 assertEquals(certsPlusExtra.length, bais.available());
[all …]
/libcore/luni/src/test/java/tests/security/cert/
DCertificateFactory2Test.java88 ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); in checkResult() local
89 DataInputStream dis = new DataInputStream(bais); in checkResult()
91 certFactory.generateCertPath(bais); in checkResult()
106 certFactory.generateCertPath(bais, "aa"); in checkResult()
123 certFactory.generateCertificate(bais); in checkResult()
138 certFactory.generateCRL(bais); in checkResult()
DCertificateFactory4Test.java71 ByteArrayInputStream bais = new ByteArrayInputStream( in test_generateCertificateLjava_io_InputStream() local
73 fact.generateCertificate(bais); in test_generateCertificateLjava_io_InputStream()
76 bais = new ByteArrayInputStream(CERTIFICATES_ENCODED_X509[i] in test_generateCertificateLjava_io_InputStream()
78 fact.generateCertificate(bais); in test_generateCertificateLjava_io_InputStream()
DX509Certificate2Test.java511 ByteArrayInputStream bais = new ByteArrayInputStream(string.getBytes()); in generateCert() local
512 X509Certificate cert = (X509Certificate) cf.generateCertificate(bais); in generateCert()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKFixedZoneRulesSerialization.java108 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_serialization() local
109 ObjectInputStream in = new ObjectInputStream(bais); in test_serialization()
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/io/
DObjectInputStreamTest.java160 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in test_ClassDescriptor() local
162 bais, cls); in test_ClassDescriptor()
1084 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_resolveClass() local
1085 ObjectInputStream ois = new ObjectInputStreamWithResolve(bais); in test_resolveClass()
1127 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_resolveObjectLjava_lang_Object() local
1129 new ObjectInputStreamWithResolveObject(bais); in test_resolveObjectLjava_lang_Object()
1149 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_readClassDescriptor() local
1151 bais); in test_readClassDescriptor()
1157 bais = new ByteArrayInputStream(bytes); in test_readClassDescriptor()
1159 bais); in test_readClassDescriptor()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DSerializationBenchmark.java97 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in readSingleObject() local
99 ObjectInputStream in = new ObjectInputStream(bais); in readSingleObject()
102 bais.reset(); in readSingleObject()
/libcore/luni/src/test/java/libcore/java/util/zip/
DDeflaterOutputStreamTest.java146 ByteArrayInputStream bais = new ByteArrayInputStream(compressed); in testSyncFlushDeflater() local
147 InflaterInputStream iis = new InflaterInputStream(bais); in testSyncFlushDeflater()
/libcore/luni/src/test/java/libcore/java/util/jar/
DOldManifestTest.java135 ByteArrayInputStream bais = new ByteArrayInputStream(b); in test_writeLjava_io_OutputStream() local
138 manifest2 = new Manifest(bais); in test_writeLjava_io_OutputStream()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DCipherInputStream1Test.java253 ByteArrayInputStream bais = new ByteArrayInputStream(new byte[100]); in test_ConstructorLjava_io_InputStreamLjavax_crypto_Cipher() local
262 CipherInputStream cis = new CipherInputStream(bais, c); in test_ConstructorLjava_io_InputStreamLjavax_crypto_Cipher()
/libcore/ojluni/src/test/java/time/tck/java/time/
DAbstractTCKTest.java123 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in assertSerializedBySer() local
124 try (DataInputStream dis = new DataInputStream(bais)) { in assertSerializedBySer()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java111 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in test_serialization() local
113 ObjectInputStream in = new ObjectInputStream(bais); in test_serialization()
/libcore/luni/src/test/java/libcore/java/util/
DBase64Test.java917 ByteArrayInputStream bais = new ByteArrayInputStream(encoded); in checkRoundTrip_wrapInputStream() local
918 InputStream b64is = decoder.wrap(bais); in checkRoundTrip_wrapInputStream()
926 bais = new ByteArrayInputStream(encoded); in checkRoundTrip_wrapInputStream()
927 b64is = decoder.wrap(bais); in checkRoundTrip_wrapInputStream()
935 bais = new ByteArrayInputStream(encoded); in checkRoundTrip_wrapInputStream()
936 b64is = decoder.wrap(bais); in checkRoundTrip_wrapInputStream()
/libcore/ojluni/src/test/java/util/List/
DListFactories.java294 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in serialClone() local
295 ObjectInputStream ois = new ObjectInputStream(bais); in serialClone()
/libcore/luni/src/test/java/libcore/java/util/prefs/
DOldAbstractPreferencesTest.java997 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testExportNode() local
1027 pref.importPreferences(bais); in testExportNode()
1047 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testExportSubtree() local
1082 pref.importPreferences(bais); in testExportSubtree()
/libcore/luni/src/test/java/libcore/java/lang/
DOldRuntimeTest.java461 ByteArrayInputStream bais = new ByteArrayInputStream( in test_getLocalizedInputStream() local
465 Runtime.getRuntime().getLocalizedInputStream(bais); in test_getLocalizedInputStream()
DLambdaImplementationTest.java230 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in roundtripSerialization() local
231 try (ObjectInputStream is = new ObjectInputStream(bais)) { in roundtripSerialization()
/libcore/support/src/test/java/libcore/java/security/
DTestKeyStore.java764 ByteArrayInputStream bais = new ByteArrayInputStream(x509c.getEncoded()); in createCertificate() local
765 Certificate c = cf.generateCertificate(bais); in createCertificate()

12