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

12345

/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...]
/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
50 is.close();
60 INPUT_LENGTH, is.available());
62 is.close();
64 is.available();
72 is.close();
75 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 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DByteArrayInputStreamTest.java12 * 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 DFileInputStreamTest.java12 * 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 DFilterInputStreamTest.java12 * 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 DBufferedInputStreamTest.java12 * 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 DDataInputStreamTest.java12 * 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 DObjectOutputStream2Test.java12 * 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 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...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
H A DGenericSignatureFormatErrorTest.java29 InputStream is = this.getClass().getResourceAsStream("/resources/dex1.bytes");
30 assertNotNull(is);
37 // dalvikvm: 'waitpid failed' log msg - only occurs when @SideEffect is removed
38 // and this test is run via running tests.luni.AllTestsLang TestSuite
41 * dex1.bytes is a jar file with a classes.dex in it.
60 InputStream is = this.getClass().getResourceAsStream("/resources/dex1.bytes");
61 assertNotNull(is);
63 copy(is, fos);
89 private void copy(InputStream is, OutputStream os) { argument
92 while ((b = is
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DZipFileTest.java12 * 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 DDeflaterInputStreamTest.java12 * 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/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 bufferSize) argument
[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/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DClassLoaderTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
50 // The SystemClassLoader's parent should be the Boot classloader, which is used to load
56 // It is difficult to test further because the CTS tests run as an instrumented TestCase.
58 // load app classes and resources, not the System ClassLoader. The System ClassLoader is not
69 // It is difficult to test this because the CTS tests run as an instrumented TestCase.
82 // class while being deliberately vague about which classloader it actually is.
100 // class while being deliberately vague about which classloader it actually is.
112 // class while being deliberately vague about which classloader it actually is.
135 InputStream is = null;
137 is
[all...]
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/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
H A DJarInputStreamTest.java12 * 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/luni/src/test/java/libcore/java/util/zip/
H A DOldZipFileTest.java12 * 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...]

Completed in 720 milliseconds

12345