Searched defs:is (Results 1 - 25 of 44) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DProcessTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
58 // send data, and check if it is echoed back correctly
61 String str3 = "Here is some more data.\n";
98 private String readAndCloseStream(InputStream is) throws IOException { argument
101 int c = is.read();
107 is.close();
120 process.waitFor(); // destroy is asynchronous.
H A DRuntimeTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
30 InputStream is; field in class:RuntimeTest
/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/luni/src/main/java/java/security/
H A DKeyRep.java12 * distributed under the License is distributed on an "AS IS" BASIS,
31 * {@code KeyRep} is a standardized representation for serialized {@link Key}
61 * if {@code type, algorithm, format or encoded} is {@code null}
89 * is initialized with a {@link PKCS8EncodedKeySpec} using the encoded key
94 * generated from a key factory (suitable for the algorithm) that is
101 * if the {@code Type}|format combination is not recognized, or
146 private void readObject(ObjectInputStream is) argument
148 is.defaultReadObject();
/libcore/luni/src/main/java/java/util/zip/
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 buffer}, starting at offset {@code byteOffset}. The checksum is
[all...]
H A DGZIPInputStream.java12 * distributed under the License is distributed on an "AS IS" BASIS,
30 * The {@code GZIPInputStream} class is used to read data stored in the GZIP
35 * <p>Using {@code GZIPInputStream} is easier than {@link ZipInputStream}
36 * because GZIP is only for compression, and is not a container for multiple files.
39 * InputStream is = ...
40 * GZIPInputStream zis = new GZIPInputStream(new BufferedInputStream(is));
82 * @param is
87 public GZIPInputStream(InputStream is) throws IOException { argument
88 this(is, BUF_SIZ
102 GZIPInputStream(InputStream is, int size) argument
[all...]
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/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...]
/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 DFileInputStreamTest.java11 * distributed under the License is distributed on an "AS IS" BASIS,
61 private void verifyData(FileInputStream is, int start, int count) throws IOException { argument
63 assertEquals(count, is.read(buffer));
161 // Closing an already-closed stream is a no-op...
165 // But any explicit activity is an error.
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 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 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 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...]
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...]
/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...]
/libcore/tzdata/update/src/main/libcore/tzdata/update/
H A DConfigBundle.java11 * distributed under the License is distributed on an "AS IS" BASIS,
28 * A configuration bundle. This is a thin wrapper around some in-memory bytes representing a zip
62 static void extractZipSafely(InputStream is, File targetDir, boolean makeWorldReadable) argument
68 try (ZipInputStream zipInputStream = new ZipInputStream(is)) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
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 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...]
/libcore/luni/src/main/java/javax/crypto/
H A DCipherInputStream.java12 * distributed under the License is distributed on an "AS IS" BASIS,
34 * decryption is used with a {@code CipherInputStream}, the {@code
53 * @param is
58 public CipherInputStream(InputStream is, Cipher c) { argument
59 super(is);
72 * A {@code NullCipher} is created and used to process the data.
74 * @param is
77 protected CipherInputStream(InputStream is) { argument
78 this(is, new NullCipher());
83 * cipher. Returns {@code true} if output from the cipher is availabl
[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/lang/
H A DOldRuntimeTest.java12 * distributed under the License is distributed on an "AS IS" BASIS,
35 InputStream is; field in class:OldRuntimeTest

Completed in 901 milliseconds

12