Home
last modified time | relevance | path

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

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DDeflaterInputStreamTest.java64 DeflaterInputStream dis = new DeflaterInputStream(is); in testAvailable() local
65 assertEquals(1, dis.available()); in testAvailable()
66 assertEquals(120, dis.read()); in testAvailable()
67 assertEquals(1, dis.available()); in testAvailable()
68 assertEquals(22, dis.read(buf, 0, 1024)); in testAvailable()
69 assertEquals(0, dis.available()); in testAvailable()
70 assertEquals(-1, dis.read()); in testAvailable()
71 assertEquals(0, dis.available()); in testAvailable()
72 dis.close(); in testAvailable()
74 dis.available(); in testAvailable()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DOldDataInputOutputStreamTest.java31 private DataInputStream dis; field in OldDataInputOutputStreamTest
51 dis.readBoolean()); in test_read_writeBoolean()
54 dis.readBoolean(); in test_read_writeBoolean()
60 dis.close(); in test_read_writeBoolean()
62 dis.readBoolean(); in test_read_writeBoolean()
83 (byte) 127, dis.readByte()); in test_read_writeByte()
86 dis.readByte(); in test_read_writeByte()
92 dis.close(); in test_read_writeByte()
94 dis.readByte(); in test_read_writeByte()
115 'b', dis.readChar()); in test_read_writeChar()
[all …]
DOldDataInputStreamTest.java32 private DataInputStream dis; field in OldDataInputStreamTest
51 dis.close(); in test_ConstructorLjava_io_InputStream()
67 r = dis.read(rbytes); in test_read$B()
73 r = dis.read(rbytes); in test_read$B()
78 dis.close(); in test_read$B()
80 dis = new DataInputStream(sis); in test_read$B()
82 dis.read(rbytes); in test_read$B()
98 r = dis.read(rbytes, 1, testLength - 10); in test_read$BII()
105 r = dis.read(rbytes, 0, 15); in test_read$BII()
110 dis.close(); in test_read$BII()
[all …]
DOldDataOutputStreamTest.java32 private DataInputStream dis; field in OldDataOutputStreamTest
59 int c = dis.readInt(); in test_flush()
61 dis.close(); in test_flush()
78 r = dis.read(rbuf, 0, testLength); in test_write$BII()
81 dis.close(); in test_write$BII()
126 42, dis.read()); in test_writeI()
127 dis.close(); in test_writeI()
144 dis.read(rbuf, 0, testLength); in test_writeBytesLjava_lang_String()
145 dis.close(); in test_writeBytesLjava_lang_String()
163 int i, a = dis.available() / 2; in test_writeCharsLjava_lang_String()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DDataOutputStreamTest.java30 private DataInputStream dis; field in DataOutputStreamTest
52 int c = dis.readInt(); in test_flush()
53 dis.close(); in test_flush()
65 dis.read(rbuf, 0, 150); in test_size()
66 dis.close(); in test_size()
78 dis.read(rbuf, 0, 150); in test_write$BII()
79 dis.close(); in test_write$BII()
91 int c = dis.read(); in test_writeI()
92 dis.close(); in test_writeI()
103 boolean c = dis.readBoolean(); in test_writeBooleanZ()
[all …]
DDataInputStreamTest.java32 private DataInputStream dis; field in DataInputStreamTest
49 dis.close(); in test_ConstructorLjava_io_InputStream()
61 dis.read(rbytes); in test_read$B()
74 dis.read(rbytes, 0, rbytes.length); in test_read$BII()
86 assertTrue("Incorrect boolean written", dis.readBoolean()); in test_readBoolean()
96 assertTrue("Incorrect byte read", dis.readByte() == (byte) 127); in test_readByte()
106 assertEquals("Incorrect char read", 't', dis.readChar()); in test_readChar()
116 assertEquals("Incorrect double read", 2345.76834720202, dis in test_readDouble()
127 assertTrue("Incorrect float read", dis.readFloat() == 29.08764f); in test_readFloat()
138 dis.readFully(rbytes); in test_readFully$B()
[all …]
DPrintStreamTest.java387 DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bos in test_printZ() local
390 assertTrue("Incorrect boolean written", dis.readBoolean()); in test_printZ()
DSerializationStressTest.java663 DataInputStream dis = new DataInputStream(loadStream()); in test_reset() local
664 byte[] input = Streams.readFully(dis); in test_reset()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DDigestInputStreamTest.java85 InputStream dis = new DigestInputStream(is, md); in testDigestInputStream01() local
86 assertTrue(dis instanceof DigestInputStream); in testDigestInputStream01()
102 InputStream dis = new DigestInputStream(null, null); in testDigestInputStream02() local
103 assertTrue(dis instanceof DigestInputStream); in testDigestInputStream02()
118 DigestInputStream dis = new DigestInputStream(is, md); in testRead01() local
121 assertTrue("retval", ((byte)dis.read() == myMessage[i])); in testRead01()
126 dis.getMessageDigest().digest(), in testRead01()
151 DigestInputStream dis = new DigestInputStream(is, md); in testRead02() local
153 dis.read(); in testRead02()
156 assertEquals("retval1", -1, dis.read()); in testRead02()
[all …]
DDigestInputStream2Test.java42 DigestInputStream dis = new DigestInputStream(inStream, digest); in test_ConstructorLjava_io_InputStreamLjava_security_MessageDigest() local
43 assertNotNull("Constructor returned null instance", dis); in test_ConstructorLjava_io_InputStreamLjava_security_MessageDigest()
52 DigestInputStream dis = new DigestInputStream(inStream, digest); in test_getMessageDigest() local
53 assertEquals("getMessageDigest returned a bogus result", digest, dis in test_getMessageDigest()
64 DigestInputStream dis = new DigestInputStream(inStream, noChangeDigest); in test_onZ() local
66 dis.on(false); in test_onZ()
68 int c = dis.read(); in test_onZ()
77 dis = new DigestInputStream(inStream, digest); in test_onZ()
80 dis.on(true); in test_onZ()
81 c = dis.read(); in test_onZ()
[all …]
/libcore/luni/src/test/java/tests/security/cert/
DCertificateFactorySpiTest.java119 DataInputStream dis = new DataInputStream(bais); in testCertificateFactorySpi02() local
125 certFactorySpi.engineGenerateCertPath(dis); in testCertificateFactorySpi02()
132 certFactorySpi.engineGenerateCertPath(dis, ""); in testCertificateFactorySpi02()
136 certFactorySpi.engineGenerateCertPath(dis, "ss"); in testCertificateFactorySpi02()
149 .engineGenerateCertificate(dis); in testCertificateFactorySpi02()
152 .engineGenerateCertificates(dis); in testCertificateFactorySpi02()
165 CRL crl = certFactorySpi.engineGenerateCRL(dis); in testCertificateFactorySpi02()
167 Collection<? extends CRL> colcrl = certFactorySpi.engineGenerateCRLs(dis); in testCertificateFactorySpi02()
189 DataInputStream dis = new DataInputStream(bais); in testCertificateFactorySpi03() local
196 certFactorySpi.engineGenerateCertPath(dis); in testCertificateFactorySpi03()
[all …]
DCertificateFactory2Test.java89 DataInputStream dis = new DataInputStream(bais); in checkResult() local
96 certFactory.generateCertPath(dis); in checkResult()
111 certFactory.generateCertPath(dis, ""); in checkResult()
120 certFactory.generateCertPath(dis, "ss"); in checkResult()
132 Certificate cert = certFactory.generateCertificate(dis); in checkResult()
134 Collection<? extends Certificate> col = certFactory.generateCertificates(dis); in checkResult()
147 CRL crl = certFactory.generateCRL(dis); in checkResult()
149 Collection<? extends CRL> colc = certFactory.generateCRLs(dis); in checkResult()
/libcore/ojluni/src/test/java/time/tck/java/time/
DAbstractTCKTest.java124 try (DataInputStream dis = new DataInputStream(bais)) { in assertSerializedBySer() argument
125 assertEquals(dis.readShort(), ObjectStreamConstants.STREAM_MAGIC); in assertSerializedBySer()
126 assertEquals(dis.readShort(), ObjectStreamConstants.STREAM_VERSION); in assertSerializedBySer()
127 assertEquals(dis.readByte(), ObjectStreamConstants.TC_OBJECT); in assertSerializedBySer()
128 assertEquals(dis.readByte(), ObjectStreamConstants.TC_CLASSDESC); in assertSerializedBySer()
129 assertEquals(dis.readUTF(), serClass); in assertSerializedBySer()
130 assertEquals(dis.readLong(), serVer); in assertSerializedBySer()
131 …assertEquals(dis.readByte(), ObjectStreamConstants.SC_EXTERNALIZABLE | ObjectStreamConstants.SC_BL… in assertSerializedBySer()
132 assertEquals(dis.readShort(), 0); // number of fields in assertSerializedBySer()
133 … assertEquals(dis.readByte(), ObjectStreamConstants.TC_ENDBLOCKDATA); // end of classdesc in assertSerializedBySer()
[all …]
/libcore/ojluni/src/main/java/sun/security/pkcs/
DPKCS7.java120 DataInputStream dis = new DataInputStream(in); in PKCS7() local
121 byte[] data = new byte[dis.available()]; in PKCS7()
122 dis.readFully(data); in PKCS7()
243 DerInputStream dis = new DerInputStream(val.toByteArray()); in parseNetscapeCertChain() local
245 DerValue[] contents = dis.getSequence(2, true); in parseNetscapeCertChain()
289 DerInputStream dis = val.toDerInputStream(); in parseSignedData() local
292 version = dis.getBigInteger(); in parseSignedData()
295 DerValue[] digestAlgorithmIdVals = dis.getSet(1); in parseSignedData()
312 contentInfo = new ContentInfo(dis); in parseSignedData()
325 if ((byte)(dis.peekByte()) == (byte)0xA0) { in parseSignedData()
[all …]
DContentInfo.java207 DerInputStream dis = new DerInputStream(content.toByteArray()); in getContentBytes()
208 return dis.getOctetString(); in getContentBytes()
/libcore/ojluni/src/main/java/java/io/
DDataInputStream.java590 DataInputStream dis = (DataInputStream)in; in readUTF() local
591 if (dis.bytearr.length < utflen){ in readUTF()
592 dis.bytearr = new byte[utflen*2]; in readUTF()
593 dis.chararr = new char[utflen*2]; in readUTF()
595 chararr = dis.chararr; in readUTF()
596 bytearr = dis.bytearr; in readUTF()
/libcore/ojluni/src/main/java/sun/security/util/
DDerValue.java271 DataInputStream dis = new DataInputStream(inbuf); in DerValue() local
272 dis.readFully(indefData, offset, readLen); in DerValue()
273 dis.close(); in DerValue()
389 DataInputStream dis = new DataInputStream(in); in init() local
390 dis.readFully(indefData, offset, readLen); in init()
391 dis.close(); in init()
DDerInputStream.java436 DataInputStream dis = new DataInputStream(buffer); in readVector() local
437 dis.readFully(indefData, offset, readLen); in readVector()
438 dis.close(); in readVector()
/libcore/luni/src/test/java/libcore/java/net/
DOldURLTest.java284 BufferedReader dis = null; in testOpenStream() local
288 dis = new BufferedReader( in testOpenStream()
290 while ((inputLine = dis.readLine()) != null) { in testOpenStream()
293 dis.close(); in testOpenStream()
307 dis = new BufferedReader( in testOpenStream()
309 while ((inputLine = dis.readLine()) != null) { in testOpenStream()
316 dis.close(); in testOpenStream()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DX509CertPath.java186 DerInputStream dis = new DerInputStream(readAllBytes(is)); in parsePKIPATH() local
187 DerValue[] seq = dis.getSequence(3); in parsePKIPATH()
/libcore/ojluni/src/main/java/sun/security/x509/
DRDN.java241 DerInputStream dis = new DerInputStream(rdn.toByteArray()); in RDN() local
242 DerValue[] avaset = dis.getSet(5); in RDN()
/libcore/luni/src/test/java/libcore/java/security/cert/
DX509CRLTest.java135 DataInputStream dis = new DataInputStream(ris); in getResourceAsBytes() local
137 dis.readFully(buf); in getResourceAsBytes()
DX509CertificateTest.java242 DataInputStream dis = new DataInputStream(ris); in getResourceAsBytes() local
244 dis.readFully(buf); in getResourceAsBytes()
/libcore/luni/src/test/java/libcore/java/lang/
DStringTest.java477 DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buf)); in decodeModifiedUTF8() local
478 return dis.readUTF(); in decodeModifiedUTF8()
/libcore/luni/src/main/java/libcore/net/
Dmime.types254 application/vnd.mobius.dis