Searched refs:is (Results 1 - 25 of 88) sorted by relevance

1234

/libcore/luni/src/main/java/libcore/net/url/
H A DFtpURLInputStream.java12 * distributed under the License is distributed on an "AS IS" BASIS,
27 * the control socket Object stays live while the stream is in use
31 private InputStream is; // Actual input stream field in class:FtpURLInputStream
35 public FtpURLInputStream(InputStream is, Socket controlSocket) { argument
36 this.is = is;
42 return is.read();
47 return is.read(buf, off, nbytes);
52 is.reset();
57 is
[all...]
H A DFileURLConnection.java12 * distributed under the License is distributed on an "AS IS" BASIS,
36 * This class is responsible for connecting, getting content and input stream of
43 private InputStream is; field in class:FileURLConnection
55 * @param url The URL this connection is connected to
68 * by this <code>URL</code>. If the file is a directory, it will return
79 is = getDirectoryListing(f);
82 is = new BufferedInputStream(new FileInputStream(f));
103 // default is -1
132 result = guessContentTypeFromStream(is);
183 return is;
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DOldObjectInputOutputStreamTest.java12 * 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 DOldFilterInputStreamTest.java12 * 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
52 is.close();
62 testLength, is.available());
64 is.close();
66 is.available();
74 is.close();
77 is
[all...]
H A DOldByteArrayInputStreamTest.java12 * 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 DOldFileInputStreamTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
33 private FileInputStream is; field in class:OldFileInputStreamTest
40 is = new FileInputStream(f);
41 is.close();
47 is = new FileInputStream(f2);
48 is.close();
73 is = new FileInputStream(fileName);
74 is.close();
79 is = new FileInputStream("ImprobableFile.42");
80 is
[all...]
H A DOldBufferedInputStreamTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
35 private BufferedInputStream is; field in class:OldBufferedInputStreamTest
40 is = new BufferedInputStream(isFile);
43 is.read();
60 testBufferedInputStream(InputStream is) throws IOException { argument
61 super(is);
65 testBufferedInputStream(InputStream is, int size) throws IOException { argument
66 super(is, size);
74 assertTrue("Returned incorrect number of available bytes", is
105 is
[all...]
H A DOldInputStreamTest.java12 * 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...]
H A DOldInputStreamReaderTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
33 private final String source = "This is a test message with Unicode character. \u4e2d\u56fd is China's name in Chinese";
39 private InputStreamReader is; field in class:OldInputStreamReaderTest
58 is = new InputStreamReader(fis);
64 is.close();
170 is = new InputStreamReader(fis, "8859_1");
176 is = new InputStreamReader(fis, "Bogus");
186 is.close();
191 is
[all...]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
H A DIdentityScopeTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
49 IdentityScope is; field in class:IdentityScopeTest
69 is = new IdentityScopeStub("Aleksei Semenov");
70 assertNotNull(is);
71 assertEquals("Aleksei Semenov", 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());
98 * if permission is denie
[all...]
H A DDigestInputStream2Test.java12 * 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...]
H A DDigestInputStreamTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
84 InputStream is = new ByteArrayInputStream(myMessage);
85 InputStream dis = new DigestInputStream(is, md);
117 InputStream is = new ByteArrayInputStream(myMessage);
118 DigestInputStream dis = new DigestInputStream(is, md);
150 InputStream is = new ByteArrayInputStream(myMessage);
151 DigestInputStream dis = new DigestInputStream(is, md);
175 * Assertion: <code>read()</code> must not update digest if it is off<br>
185 InputStream is = new ByteArrayInputStream(myMessage);
186 DigestInputStream dis = new DigestInputStream(is, m
[all...]
/libcore/luni/src/main/java/java/util/zip/
H A DInflaterInputStream.java12 * distributed under the License is distributed on an "AS IS" BASIS,
68 * This is the most basic constructor. You only need to pass the {@code
69 * InputStream} from which the compressed data is to be read from. Default
73 * @param is
76 public InflaterInputStream(InputStream is) { argument
77 this(is, new Inflater(), BUF_SIZE);
84 * @param is
89 public InflaterInputStream(InputStream is, Inflater inflater) { argument
90 this(is, inflater, BUF_SIZE);
97 * @param is
104 InflaterInputStream(InputStream is, Inflater inflater, int bsize) argument
[all...]
H A DCheckedInputStream.java12 * distributed under the License is distributed on an "AS IS" BASIS,
25 * The {@code CheckedInputStream} class is used to maintain a checksum at the
26 * same time as the data, on which the checksum is computed, is read from a
27 * stream. The purpose of this checksum is to establish data integrity,
36 * {@code is}. The checksum will be calculated using the algorithm
42 * @param is
47 public CheckedInputStream(InputStream is, Checksum csum) { argument
48 super(is);
72 * into {@code buf}, starting at offset {@code off}. The checksum is
[all...]
/libcore/luni/src/test/java/tests/api/java/lang/reflect/
H A DGenericSignatureFormatErrorTest.java30 InputStream is = this.getClass().getResourceAsStream("dex1.bytes");
31 assertNotNull(is);
38 "dalvikvm: 'waitpid failed' log msg - only occurs when @SideEffect is removed " +
39 "and this test is run via running tests.luni.AllTestsLang TestSuite")
42 * dex1.bytes is a jar file with a classes.dex in it.
61 InputStream is = this.getClass().getResourceAsStream("dex1.bytes");
62 assertNotNull(is);
64 copy(is, fos);
90 private void copy(InputStream is, OutputStream os) { argument
93 while ((b = is
[all...]
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/
H A DDefaultSSLContextImpl.java12 * distributed under the License is distributed on an "AS IS" BASIS,
53 * since there is no way to put a synchronized around both the
76 InputStream is = null;
78 is = new BufferedInputStream(new FileInputStream(keystore));
79 ks.load(is, pwd);
81 if (is != null) {
82 is.close();
113 InputStream is = null;
115 is = new BufferedInputStream(new FileInputStream(keystore));
116 ks.load(is, pw
[all...]
/libcore/luni/src/main/java/javax/xml/parsers/
H A DDocumentBuilder.java12 * 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 DSAXParser.java12 * 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>&quot;javax.xml.parsers.SAXParserFactory&quot;</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 DOldJarInputStreamTest.java12 * 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/luni/src/test/java/org/apache/harmony/archive/tests/java/util/zip/
H A DZipFileTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
39 public byte[] getAllBytesFromStream(InputStream is) throws IOException { argument
44 while (is.available() > 0) {
45 iRead = is.read(buf, 0, buf.length);
252 assertEquals("incorrect contents", "This is also text", new String(buf,
297 InputStream is = null;
300 is = zfile.getInputStream(zentry);
303 is.read(rbuf, 0, r = (int) zentry.getSize());
304 assertEquals("getInputStream read incorrect data", "This is text",
310 is
[all...]
/libcore/luni/src/test/java/tests/api/java/lang/
H A DProcess2Test.java12 * distributed under the License is distributed on an "AS IS" BASIS,
52 InputStream is = process.getErrorStream();
55 int c = is.read();
71 InputStream is = erProcess.getErrorStream();
74 int c = is.read();
/libcore/luni/src/main/java/libcore/net/http/
H A DUnknownLengthHttpInputStream.java11 * distributed under the License is distributed on an "AS IS" BASIS,
30 UnknownLengthHttpInputStream(InputStream is, CacheRequest cacheRequest, argument
32 super(is, httpEngine, cacheRequest);
/libcore/luni/src/main/java/javax/crypto/
H A DCipherInputStream.java12 * distributed under the License is distributed on an "AS IS" BASIS,
33 * decryption is used with a {@code CipherInputStream}, the {@code
55 * @param is
60 public CipherInputStream(InputStream is, Cipher c) { argument
61 super(is);
69 * A {@code NullCipher} is created and used to process the data.
71 * @param is
74 protected CipherInputStream(InputStream is) { argument
75 this(is, new NullCipher());
81 * @return the next byte, or {@code -1} if the end of the stream is reache
[all...]
/libcore/luni/src/test/java/libcore/sqlite/
H A DOldBlobTest.java11 * distributed under the License is distributed on an "AS IS" BASIS,
78 * db.open_blob is not supported.
93 InputStream is = blob.getInputStream();
94 is.skip(96);
95 assertEquals(4,is.read(b));
96 is.close();
/libcore/luni/src/test/java/tests/api/javax/xml/parsers/
H A DSAXParserTest.java11 * distributed under the License is distributed on an "AS IS" BASIS,
59 // it is a fake
69 // it is a fake
78 // it is a fake
87 // it is a fake
96 // it is a fake
107 // it is a fake
209 // InputStream is = new FileInputStream(list_wf[i]);
210 // parser.parse(is, dh, ParsingSupport.XML_SYSTEM_ID);
226 // InputStream is
[all...]

Completed in 487 milliseconds

1234