Home
last modified time | relevance | path

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

123

/libcore/luni/src/test/java/tests/security/cert/
DCertificateFactorySpiTest.java56 ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); in testCertificateFactorySpi01() local
58 certFactorySpi.engineGenerateCertPath(bais); in testCertificateFactorySpi01()
63 certFactorySpi.engineGenerateCertPath(bais, ""); in testCertificateFactorySpi01()
78 Certificate cc = certFactorySpi.engineGenerateCertificate(bais); in testCertificateFactorySpi01()
85 Collection<? extends Certificate> col = certFactorySpi.engineGenerateCertificates(bais); in testCertificateFactorySpi01()
93 CRL ccCRL = certFactorySpi.engineGenerateCRL(bais); in testCertificateFactorySpi01()
101 Collection<? extends CRL> colCRL = certFactorySpi.engineGenerateCRLs(bais); in testCertificateFactorySpi01()
118 ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); in testCertificateFactorySpi02() local
119 DataInputStream dis = new DataInputStream(bais); in testCertificateFactorySpi02()
121 certFactorySpi.engineGenerateCertPath(bais); in testCertificateFactorySpi02()
[all …]
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()
/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 …]
DOldAndroidInputStreamReaderTest.java96 ByteArrayInputStream bais = new ByteArrayInputStream(ba); in testStringy() local
97 InputStreamReader r = new InputStreamReader(bais, enc[i]); in testStringy()
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/ojluni/src/test/java/io/ByteArrayInputStream/
DReadAllReadNTransferTo.java54 ByteArrayInputStream bais = in testRead() local
60 if (bais.readNBytes(bN, off, len) != len) { in testRead()
69 byte[] bAll = bais.readAllBytes(); in testRead()
80 bais = new ByteArrayInputStream(buf); in testRead()
82 if (bais.transferTo(baos) != buf.length) { in testRead()
/libcore/ojluni/src/test/java/security/KeyStore/
DTestKeystoreBasic.java189 ByteArrayInputStream bais = new ByteArrayInputStream(bArr); in runTest() local
190 ks2.load(bais, null); in runTest()
206 bais = new ByteArrayInputStream(baos.toByteArray()); in runTest()
209 ks.load(bais, PASSWDK); in runTest()
216 bais.reset(); in runTest()
217 ks.load(bais, PASSWD2); in runTest()
218 bais.reset(); in runTest()
219 ks.load(bais, null); in runTest()
/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()
/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/ojluni/src/test/java/util/Properties/
DPropertiesSerialization.java85 ByteArrayInputStream bais = new in main() local
87 try (ObjectInputStream ois = new ObjectInputStream(bais)) { in main()
106 ByteArrayInputStream bais = new ByteArrayInputStream(byteArray); in main() local
107 ObjectInputStream ois = new ObjectInputStream(bais); in main()
DEscapeSpace.java102 ByteArrayInputStream bais = new ByteArrayInputStream(props.getBytes()); in main() local
106 props0.load(bais); in main()
/libcore/ojluni/src/test/java/io/Serializable/records/
DUnsharedTest.java103 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in serialize() local
104 return new ObjectInputStream(bais); in serialize()
113 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in serializeUnshared() local
114 return new ObjectInputStream(bais); in serializeUnshared()
DSerialVersionUIDTest.java91 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in testSerialize() local
92 DataInputStream dis = new DataInputStream(bais); in testSerialize()
167 ByteArrayInputStream bais = new ByteArrayInputStream(streamBytes); in deserialize() local
168 ObjectInputStream ois = new ObjectInputStream(bais); in deserialize()
/libcore/ojluni/src/test/java/util/UUID/
DSerial.java49 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in main() local
50 ObjectInputStream ois = new ObjectInputStream(bais); in main()
/libcore/ojluni/src/test/java/text/AttributedCharacterIterator/Attribute/
DReadResolve.java63 ByteArrayInputStream bais = new ByteArrayInputStream(data); in doSerializationCycle() local
64 ObjectInputStream ois = new ObjectInputStream(bais); in doSerializationCycle()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneRulesSerialization.java94 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in assertSerialization() local
95 ObjectInputStream in = new ObjectInputStream(bais); in assertSerialization()
DTCKFixedZoneRulesSerialization.java108 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); in test_serialization() local
109 ObjectInputStream in = new ObjectInputStream(bais); in test_serialization()
/libcore/ojluni/src/test/java/util/EnumMap/
DSimpleSerialization.java63 final ByteArrayInputStream bais = new ByteArrayInputStream(data); in testSimpleSerialization() local
64 final ObjectInputStream ois = new ObjectInputStream(bais); in testSimpleSerialization()
/libcore/ojluni/src/test/java/util/Base64/
DTestBase64.java201 ByteArrayInputStream bais = new ByteArrayInputStream(encoded); in test() local
202 InputStream is = dec.wrap(bais); in test()
225 bais.reset(); in test()
226 is = dec.wrap(bais); in test()
329 ByteArrayInputStream bais = new ByteArrayInputStream(decoded); in testIOE() local
330 InputStream is = dec.wrap(bais); in testIOE()
601 ByteArrayInputStream bais = in testDecoderKeepsAbstinence() local
603 try (InputStream is = dec.wrap(bais)) { in testDecoderKeepsAbstinence()
608 if (bais.available() != input.length()) in testDecoderKeepsAbstinence()
610 + "but consumed " + (input.length() - bais.available()) in testDecoderKeepsAbstinence()
/libcore/ojluni/src/test/java/util/Vector/
DSimpleSerialization.java60 final ByteArrayInputStream bais = new ByteArrayInputStream(data); in main() local
61 final ObjectInputStream ois = new ObjectInputStream(bais); in main()
/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 …]

123