/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldObjectInputOutputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 30 private ObjectInputStream is; field in class:OldObjectInputOutputStreamTest 42 is.readBoolean()); 45 is.readBoolean(); 51 is.close(); 53 is.readBoolean(); 66 (byte) 127, is.readByte()); 69 is.readByte(); 75 is.close(); 77 is [all...] |
H A D | OldFilterInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 30 public MyFilterInputStream(java.io.InputStream is) { argument 31 super(is); 37 private FilterInputStream is; field in class:OldFilterInputStreamTest 50 is.close(); 60 INPUT_LENGTH, is.available()); 62 is.close(); 64 is.available(); 72 is.close(); 75 is [all...] |
H A D | OldByteArrayInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 25 private ByteArrayInputStream is; field in class:OldByteArrayInputStreamTest 81 assertTrue("Returned incorrect number of available bytes", is 89 is.read(); 91 is.close(); 96 is.read(); 107 is.skip(3000); 108 is.mark(1000); 109 is.read(buf1, 0, buf1.length); 110 is [all...] |
H A D | OldInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 29 private InputStream is; field in class:OldInputStreamTest 62 assertEquals(is.available(), 0); 67 is.close(); 75 is.mark(10); 83 is.markSupported()); 95 is.read(b), 10); 102 // Test 2: Test that the correct number of bytes read is returned 105 bytesRead = is.read(b); 116 bytesRead = is [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | ByteArrayInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 27 private InputStream is; field in class:ByteArrayInputStreamTest 77 assertTrue("Returned incorrect number of available bytes", is 85 is.read(); 86 is.close(); 87 is.read(); // Should be able to read from a closed stream 96 is.skip(3000); 97 is.mark(1000); 98 is.read(buf1, 0, buf1.length); 99 is [all...] |
H A D | FileInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 33 private java.io.InputStream is; field in class:FileInputStreamTest 109 is = new FileInputStream(f); 110 is.close(); 127 is = new FileInputStream(fileName); 128 is.close(); 136 is = new FileInputStream(""); 141 if (is != null) { 142 is.close(); 146 is [all...] |
H A D | FilterInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 32 public MyFilterInputStream(InputStream is) { argument 33 super(is); 38 private InputStream is; field in class:FilterInputStreamTest 95 * is called before a test is executed. 104 is = new MyFilterInputStream(new java.io.FileInputStream(fileName)); 109 * method is called after a test is executed. 114 is [all...] |
H A D | BufferedInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 87 private BufferedInputStream is; field in class:BufferedInputStreamTest 120 is = new BufferedInputStream(isBytes, bufferSize); 122 is.read(); 128 is.skip(bufferSize - 2); 129 is.read(); 131 // is.read should now throw an exception because it will have to 133 is.read(); 150 MockBufferedInputStream(InputStream is) throws IOException { argument 151 super(is); 155 MockBufferedInputStream(InputStream is, int size) argument [all...] |
H A D | DataInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 159 DataInputStream is = new DataInputStream(new ByteArrayInputStream( 165 is.readFully(byteArray, -1, -1); 172 is.readFully(byteArray, 0, -1); 179 is.readFully(byteArray, 1, -1); 185 is.readFully(byteArray, -1, 0); 186 is.readFully(byteArray, 0, 0); 187 is.readFully(byteArray, 1, 0); 190 is.readFully(byteArray, -1, 1); 196 is [all...] |
H A D | ObjectOutputStream2Test.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 54 ObjectInputStream is = new ObjectInputStream(bis); 55 Object readObj = is.readObject(); 56 is.close();
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | IdentityScopeTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 49 IdentityScope is; field in class:IdentityScopeTest 69 is = new IdentityScopeStub("Sergio Giro"); 70 assertNotNull(is); 71 assertEquals("Sergio Giro", is.getName()); 79 is = new IdentityScopeStub("Aleksei Semenov", scope); 80 assertNotNull(is); 81 assertEquals("Aleksei Semenov", is.getName()); 82 assertEquals(scope.getName(), is.getScope().getName()); 89 // There is n [all...] |
H A D | DigestInputStream2Test.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 137 DigestInputStream is = new DigestInputStream(inStream, digest); 140 is.read(buf, -1, 0); 148 is.read(buf, -1, 0); 155 is.read(buf, 0, -1); 162 is.read(buf, -1, -1); 169 is.read(buf, 0, 1001); 176 is.read(buf, 1001, 0); 183 is.read(buf, 500, 501); 189 is [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
H A D | GenericSignatureFormatErrorTest.java | 28 InputStream is = this.getClass().getResourceAsStream("/resources/dex1.bytes"); 29 assertNotNull(is); 34 // dalvikvm: 'waitpid failed' log msg - only occurs when @SideEffect is removed 35 // and this test is run via running tests.luni.AllTestsLang TestSuite 38 * dex1.bytes is a jar file with a classes.dex in it. 57 InputStream is = this.getClass().getResourceAsStream("/resources/dex1.bytes"); 58 assertNotNull(is); 60 copy(is, fos); 86 private void copy(InputStream is, OutputStream os) { argument 89 while ((b = is [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
H A D | ZipFileTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 210 assertEquals("incorrect contents", "This is also text", new String(buf, 255 InputStream is = null; 258 is = zfile.getInputStream(zentry); 261 is.read(rbuf, 0, r = (int) zentry.getSize()); 262 assertEquals("getInputStream read incorrect data", "This is text", 268 is.close(); 277 is = zfile.getInputStream(zentry); 315 InputStream is = zfile.getInputStream(zentry); 319 r1 = is [all...] |
H A D | DeflaterInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 33 private static final String TEST_STR = "Hi,this is a test"; 40 private InputStream is; field in class:DeflaterInputStreamTest 45 is = new ByteArrayInputStream(TEST_STR.getBytes("UTF-8")); 50 is.close(); 59 DeflaterInputStream dis = new DeflaterInputStream(is); 81 DeflaterInputStream dis = new DeflaterInputStream(is); 105 DeflaterInputStream dis = new DeflaterInputStream(is); 117 DeflaterInputStream dis = new DeflaterInputStream(is); 127 DeflaterInputStream dis = new DeflaterInputStream(is); [all...] |
/libcore/ojluni/src/main/java/sun/security/provider/ |
H A D | X509Factory.java | 5 * This code is free software; you can redistribute it and/or modify it 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 72 * the data read from the input stream <code>is</code>. 74 * @param is an input stream with the certificate data. 81 public Certificate engineGenerateCertificate(InputStream is) argument 84 if (is == null) { 91 byte[] encoding = readOneBlock(is); 131 * If the given X509Certificate or X509CertImpl is already present 132 * in the cert cache, the cached object is returne 329 engineGenerateCertificates(InputStream is) argument 353 engineGenerateCRL(InputStream is) argument 390 engineGenerateCRLs( InputStream is) argument 409 parseX509orPKCS7Cert(InputStream is) argument 442 parseX509orPKCS7CRL(InputStream is) argument 481 readOneBlock(InputStream is) argument 610 readBERInternal(InputStream is, ByteArrayOutputStream bout, int tag) argument [all...] |
/libcore/luni/src/main/java/javax/xml/parsers/ |
H A D | DocumentBuilder.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 40 * an instance of this class is obtained, XML can be parsed from a 65 * <p><code>DocumentBuilder</code> is reset to the same state as when it was created with 67 * <code>reset()</code> is designed to allow the reuse of existing <code>DocumentBuilder</code>s 70 * <p>The reset <code>DocumentBuilder</code> is not guaranteed to have the same {@link EntityResolver} or {@link ErrorHandler} 71 * <code>Object</code>s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal 89 * An <code>IllegalArgumentException</code> is thrown if the 90 * <code>InputStream</code> is null. 92 * @param is InputStream containing the content to be parsed. 100 public Document parse(InputStream is) argument 124 parse(InputStream is, String systemId) argument 199 parse(InputSource is) argument [all...] |
H A D | SAXParser.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 46 * Once an instance of this class is obtained, XML can be parsed from 55 * to create is named <code>"javax.xml.parsers.SAXParserFactory"</code>. 56 * This property names a class that is a concrete subclass of this 57 * abstract class. If no property is defined, a platform default 60 * As the content is parsed by the underlying parser, methods of the 87 * <p><code>SAXParser</code> is reset to the same state as when it was created with 89 * <code>reset()</code> is designed to allow the reuse of existing <code>SAXParser</code>s 92 * <p>The reset <code>SAXParser</code> is not guaranteed to have the same {@link Schema} 93 * <code>Object</code>, e.g. {@link Object#equals(Object obj)}. It is guarantee 124 parse(InputStream is, HandlerBase hb) argument 152 parse( InputStream is, HandlerBase hb, String systemId) argument 180 parse(InputStream is, DefaultHandler dh) argument 205 parse( InputStream is, DefaultHandler dh, String systemId) argument 346 parse(InputSource is, HandlerBase hb) argument 377 parse(InputSource is, DefaultHandler dh) argument [all...] |
/libcore/luni/src/test/java/libcore/java/util/jar/ |
H A D | OldJarInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 34 // we need a buffered stream because ByteArrayInputStream.close() is a no-op 35 InputStream is = new BufferedInputStream(new ByteArrayInputStream(new byte[0])); 36 is.close(); 37 new JarInputStream(is, false); 59 InputStream is = Support_Resources.getStream("Broken_entry.jar"); 60 Mock_JarInputStream mjis = new Mock_JarInputStream(is); 67 InputStream is = Support_Resources.getStream("Broken_entry_data.jar"); 68 JarInputStream jis = new JarInputStream(is, true);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/ |
H A D | JarInputStreamTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 57 InputStream is = new URL(jarName).openConnection().getInputStream(); 59 JarInputStream jis = new JarInputStream(is); 75 InputStream is = Support_Resources.getStream("Broken_entry.jar"); 76 JarInputStream jis = new JarInputStream(is, false); 97 InputStream is = new URL(jarName).openConnection().getInputStream(); 98 JarInputStream jis = new JarInputStream(is); 116 is = Support_Resources.getStream("Broken_entry.jar"); 117 jis = new JarInputStream(is, false); 131 InputStream is [all...] |
/libcore/ojluni/src/main/java/javax/crypto/ |
H A D | CipherInputStream.java | 5 * This code is free software; you can redistribute it and/or modify it 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 31 * A CipherInputStream is composed of an InputStream and a Cipher so 37 * <p> For example, if the Cipher is initialized for decryption, the 50 * <p> It is crucial for a programmer using this class not to use 52 * new method or constructor that is later added to one of the super 76 engine. the size 512 bytes is somewhat randomly chosen */ 132 * <br>Note: if the specified input stream or cipher is 135 * @param is th 138 CipherInputStream(InputStream is, Cipher c) argument 152 CipherInputStream(InputStream is) argument [all...] |
/libcore/ojluni/src/main/java/java/net/ |
H A D | URLConnection.java | 6 * This code is free software; you can redistribute it and/or modify it 12 * This code is distributed in the hope that it will be useful, but WITHOUT 15 * version 2 for more details (a copy is included in the LICENSE file that 44 * The abstract class <code>URLConnection</code> is the superclass 48 * general, creating a connection to a URL is a multistep process: 62 * <li>The connection object is created by invoking the 65 * <li>The actual connection to the remote object is made, using the 96 * the contents after the connection is made to the remote object: 115 * <code>getContentType</code> method is used by the 135 * In JDK 1.1.6 and later, <code>fileNameMap</code> is privat 1415 guessContentTypeFromStream(InputStream is) argument 1580 checkfpx(InputStream is) argument 1741 readBytes(int c[], int len, InputStream is) argument 1762 skipForward(InputStream is, long toSkip) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | Process2Test.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 45 InputStream is = process.getErrorStream(); 48 int c = is.read(); 66 InputStream is = erProcess.getErrorStream(); 69 int c = is.read();
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
H A D | X509CertPath.java | 5 * This code is free software; you can redistribute it and/or modify it 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 55 * That is, the issuer of one certificate is the subject of the following 74 * The names of our encodings. PkiPath is the default. 101 * that is not an <code>X509Certificate</code> 109 // Note; The certs parameter is not necessarily to be of Certificate 111 // is CertificateException, rather than ClassCastException, please 117 ("List is no 138 X509CertPath(InputStream is) argument 152 X509CertPath(InputStream is, String encoding) argument 176 parsePKIPATH(InputStream is) argument 217 parsePKCS7(InputStream is) argument 258 readAllBytes(InputStream is) argument [all...] |
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | OldZipFileTest.java | 12 * distributed under the License is distributed on an "AS IS" BASIS, 31 public byte[] getAllBytesFromStream(InputStream is) throws IOException { argument 35 while ((iRead = is.read(buf, 0, buf.length)) != -1) { 127 InputStream is = null; 132 is = zfile.getInputStream(zentry); 141 * is called before a test is executed. 148 InputStream is = Support_Resources.getStream("hyts_ZipFile.zip"); 150 byte[] rbuf = getAllBytesFromStream(is); 152 is [all...] |