Home
last modified time | relevance | path

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

12345678910>>...12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DBufferedReaderTest.java94 br.read(); in test_close()
113 br.read(buf, 0, 500); in test_markI()
121 br.read(buf, 0, 1000); in test_markI()
136 in.read(new char[14], 0, 14); in test_markI()
138 assertTrue("Wrong chars", in.read() == (char) 6 in test_markI()
139 && in.read() == (char) 7); in test_markI()
146 assertTrue("Wrong chars 2", in.read() == (char) 6 in test_markI()
147 && in.read() == (char) 7); in test_markI()
152 int result = br.read(carray); in test_markI()
157 assertEquals("Assert 3:", '3', br.read()); in test_markI()
[all …]
DBufferedInputStreamTest.java97 str.read(); in test_ConstructorLjava_io_InputStream()
110 str.read(); in test_ConstructorLjava_io_InputStreamI()
122 is.read(); in test_ConstructorLjava_io_InputStreamI()
129 is.read(); in test_ConstructorLjava_io_InputStreamI()
133 is.read(); in test_ConstructorLjava_io_InputStreamI()
198 public int read() { in test_close()
203 public int read(byte[] buf, int offset, int length) { in test_close()
234 bufin.read(new byte[100], 0, 99); in test_close()
249 is.read(buf1, 0, buf1.length); in test_markI()
251 is.read(buf2, 0, buf2.length); in test_markI()
[all …]
DInputStreamReaderTest.java67 public int read() { in read() method in InputStreamReaderTest.LimitedByteArrayInputStream
76 public int read(byte[] buffer, int offset, int length) { in read() method in InputStreamReaderTest.LimitedByteArrayInputStream
143 is.read(); in test_close()
170 int count = reader.read(new char[1]); in test_close()
176 reader.read(); in test_close()
326 assertEquals('T', (char) reader.read()); in test_read()
327 assertEquals('h', (char) reader.read()); in test_read()
328 assertEquals('i', (char) reader.read()); in test_read()
329 assertEquals('s', (char) reader.read()); in test_read()
330 assertEquals(' ', (char) reader.read()); in test_read()
[all …]
DLineNumberInputStreamTest.java60 lnis.read(); in test_getLineNumber()
61 lnis.read(); in test_getLineNumber()
79 assertEquals("Failed to mark", '0', lnis.read()); in test_markI()
86 assertEquals("Failed to read correct byte", '0', lnis.read()); in test_read()
88 .read()); in test_read()
90 lnis2.read() == '\n'); in test_read()
92 .read()); in test_read()
94 lnis2.read() == '\n'); in test_read()
96 .read()); in test_read()
104 lnis.read(buf, 0, 100); in test_read$BII()
[all …]
DPushbackReaderTest.java42 pbr.read(buf, 0, 5); in test_ConstructorLjava_io_Reader()
66 pbr.read(); in test_close()
101 pbr.read(); in test_read()
102 c = (char) pbr.read(); in test_read()
106 assertTrue("Wrong double byte character", reader.read() == '\u8765'); in test_read()
119 pbr.read(c, 0, 5); in test_read$CII()
133 pbr.read(null, 1, 0); in test_read_$CII_Exception()
138 pbr.read(charArray, 0, -1); in test_read_$CII_Exception()
143 pbr.read(charArray, -1, 0); in test_read_$CII_Exception()
148 pbr.read(charArray, 0, 0); in test_read_$CII_Exception()
[all …]
DFileInputStreamTest.java176 is.read(); in test_close()
190 fis1.read(); in test_close_shared_fd()
214 int c = isr.read(); in test_read()
226 is.read(buf1); in test_read$B()
239 is.read(buf1, 0, buf1.length); in test_read$BII()
248 in.read(null, 0, 0); in test_read$BII()
265 is.read(buf, -1, 0); in test_read_$BII_IOException()
275 is.read(buf, 0, -1); in test_read_$BII_IOException()
285 is.read(buf, -1, -1); in test_read_$BII_IOException()
295 is.read(buf, 0, 1001); in test_read_$BII_IOException()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSourceChannelTest.java69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable()
79 source.read(nullBuf); in test_read_LByteBuffer_Exception()
93 long count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
96 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
100 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
111 source.read(readBuf); in test_read_LByteBuffer_SourceClosed()
119 source.read(readBuf); in test_read_LByteBuffer_SourceClosed()
127 source.read(nullBuf); in test_read_LByteBuffer_SourceClosed()
135 source.read(bufArray); in test_read_LByteBuffer_SourceClosed()
143 source.read(nullBufArray); in test_read_LByteBuffer_SourceClosed()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DOldSequenceInputStreamTest.java56 si.read(); in test_read()
58 s1.charAt(1), (char) si.read()); in test_read()
64 s1.charAt(2), (char) si.read()); in test_read()
71 si.read(); in test_read()
79 si.read(); in test_read()
80 si.read(); in test_read()
84 si.read(); in test_read()
94 s2.charAt(0), (char) si.read()); in test_read()
101 "sequence input stream.", si.read() == -1); in test_read()
106 assertEquals("IOException on second stream should not affect at this time!", 72, si.read()); in test_read_exc()
[all …]
DOldFilterInputStreamTest.java75 is.read(); in test_close()
100 is.read(buf1, 0, bufSize); in test_markI()
102 is.read(buf1, 0, bufSize); in test_markI()
108 is.read(buf2, 0, bufSize); in test_markI()
117 is.read(buf1, 0, bufSize); in test_markI()
119 is.read(buf1, 0, bufSize); in test_markI()
121 is.read(buf2, 0, bufSize); in test_markI()
143 int c = is.read(); in test_read()
149 is.read(); in test_read()
159 is.read(buf1); in test_read$B()
[all …]
DOldBufferedReaderTest.java63 br.read(); in test_close()
92 br.read(buf, 0, 500); in test_markI()
102 br.read(buf, 0, 1000); in test_markI()
116 in.read(new char[14], 0, 14); in test_markI()
118 assertTrue("Wrong chars", in.read() == (char) 6 in test_markI()
119 && in.read() == (char) 7); in test_markI()
130 assertTrue("Wrong chars 2", in.read() == (char) 6 in test_markI()
131 && in.read() == (char) 7); in test_markI()
147 int r = br.read(); in test_read()
151 assertTrue("Wrong double byte character", br.read() == '\u8765'); in test_read()
[all …]
DOldInputStreamReaderTest.java74 reader.read(new char[3], -1, 0); in testReadcharArrayintint()
80 reader.read(new char[3], 0, -1); in testReadcharArrayintint()
86 reader.read(new char[3], 4, 0); in testReadcharArrayintint()
92 reader.read(new char[3], 3, 1); in testReadcharArrayintint()
98 reader.read(new char[3], 1, 3); in testReadcharArrayintint()
104 reader.read(new char[3], 0, 4); in testReadcharArrayintint()
111 reader.read(null, 0, 0); in testReadcharArrayintint()
117 assertEquals(0, reader.read(new char[3], 3, 0)); in testReadcharArrayintint()
119 assertEquals(0, reader.read(chars, 0, 0)); in testReadcharArrayintint()
121 assertEquals(3, reader.read(chars, 0, 3)); in testReadcharArrayintint()
[all …]
DOldPushbackReaderTest.java41 pbr.read(buf, 0, 5); in test_ConstructorLjava_io_Reader()
114 assertEquals("Wrong value read!", 66, tobj.read()); in test_read()
117 tobj.read(); in test_read()
132 tobj.read(buf, 6, 5); in test_read$CII()
137 tobj.read(buf, 6, 5); in test_read$CII()
146 pbr.read(c, 0, 5); in test_read$CII()
150 assertEquals(0, pbr.read(c, 0, 0)); in test_read$CII()
151 assertEquals(c.length, pbr.read(c, 0, c.length)); in test_read$CII()
152 assertEquals(0, pbr.read(c, c.length, 0)); in test_read$CII()
168 pbr.read(nullCharArray, 0, 1); in test_read_$CII_Exception()
[all …]
DOldCharArrayReaderTest.java75 'W', cr.read()); in test_Constructor$CII()
85 cr.read(); in test_close()
100 cr.read(); in test_markI()
103 'W', cr.read()); in test_markI()
128 'H', cr.read()); in test_read()
131 cr.read() == '\u8765'); in test_read()
135 cr.read(); in test_read()
149 cr.read(c, 1, 10); in test_read$CII()
155 cr.read(null, 1, 0); in test_read$CII()
162 cr.read(c , -1, 1); in test_read$CII()
[all …]
DOldLineNumberInputStreamTest.java50 '0', lnis.read()); in test_read()
52 '0', lnis2.read()); in test_read()
54 '\n', lnis2.read()); in test_read()
56 '1', lnis2.read()); in test_read()
58 '\n', lnis2.read()); in test_read()
60 '2', lnis2.read()); in test_read()
64 lnis.read(); in test_read()
73 lnis.read(buf, 0, 100); in test_read$BII()
79 lnis.read(buf, 0, 100); in test_read$BII()
90 lnis.read(buf, -1, 1); in test_read$BII_Exception()
[all …]
DOldReaderTest.java37 assertEquals("Wrong return value!", 4, simple.read(buf)); in test_Reader_CharBufferChar()
40 simple.read(buf); in test_Reader_CharBufferChar()
45 simple.read(buf); in test_Reader_CharBufferChar()
55 assertEquals("Wrong return value!", 4, simple.read(buf)); in test_Read_$C()
57 simple.read(buf); in test_Read_$C()
61 simple.read(buf); in test_Read_$C()
74 int res = simple.read(); in test_read()
76 res = simple.read(); in test_read()
80 simple.read(); in test_read()
99 simple.read(buf); in test_skip()
[all …]
DOldAndroidBufferedInputStreamTest.java41 Assert.assertEquals(str, read(a)); in testBufferedInputStream()
48 Assert.assertEquals("AbCdEfGhIj", read(b, 10)); in testBufferedInputStream()
62 assertEquals('A', d.read()); in testBufferedInputStream()
64 assertEquals('b', d.read()); in testBufferedInputStream()
65 assertEquals('C', d.read()); in testBufferedInputStream()
67 assertEquals('b', d.read()); in testBufferedInputStream()
76 assertEquals(str, read(e, 10000)); in testBufferedInputStream()
82 public static String read(InputStream a) throws IOException { in read() method in OldAndroidBufferedInputStreamTest
86 r = a.read(); in read()
98 r = a.read(); in skipRead()
[all …]
DOldPushbackInputStreamTest.java111 assertEquals("Test 1: Incorrect byte read;", 66, tobj.read()); in test_read()
114 tobj.read(); in test_read()
121 fileString.getBytes()[0], pis.read()); in test_read()
129 tobj.read(buf, 6, 5); in test_read$BII()
134 tobj.read(buf, 6, 5); in test_read$BII()
147 tobj.read(buf, -1, 1); in test_read$BII_Exception()
153 tobj.read(buf, 0, -1); in test_read$BII_Exception()
159 tobj.read(buf, 10, 1); in test_read$BII_Exception()
187 pis.read(buf, 0, buf.length); in test_skipJ()
193 pis.read(buf2, 0, buf2.length); in test_skipJ()
[all …]
DOldInputStreamTest.java42 public int read() throws IOException { in read() method in OldInputStreamTest.MockInputStream
95 is.read(b), 10); in test_read$B()
105 bytesRead = is.read(b); in test_read$B()
116 bytesRead = is.read(b); in test_read$B()
126 bytesRead = is.read(b, -1, 5); in test_read$BII_Exception()
134 bytesRead = is.read(b, 5, -1); in test_read$BII_Exception()
143 bytesRead = is.read(b, 6, 5); in test_read$BII_Exception()
151 bytesRead = is.read(b, 6, 4); in test_read$BII_Exception()
159 bytesRead = is.read(b, 6, 0); in test_read$BII_Exception()
175 is.read(b, 0, 5), 5); in test_read$BII()
[all …]
/libcore/luni/src/main/java/java/io/
DReader.java122 public int read() throws IOException { in read() method in Reader
125 if (read(charArray, 0, 1) != -1) { in read()
140 public int read(char[] buffer) throws IOException { in read() method in Reader
141 return read(buffer, 0, buffer.length); in read()
153 public abstract int read(char[] buffer, int offset, int count) throws IOException; in read() method in Reader
212 int read = read(charsSkipped, 0, toRead); in skip()
213 if (read == -1) { in skip()
216 skipped += read; in skip()
217 if (read < toRead) { in skip()
242 public int read(CharBuffer target) throws IOException {
[all …]
DBufferedInputStream.java149 int result = localIn.read(localBuf); in fillbuf()
175 int bytesread = localIn.read(localBuf, pos, localBuf.length - pos); in fillbuf()
224 public synchronized int read() throws IOException { in read() method in BufferedInputStream
252 …@Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) throws IOExce… in read() method in BufferedInputStream
284 int read; in read() local
290 read = localIn.read(buffer, byteOffset, required); in read()
291 if (read == -1) { in read()
306 read = count - pos >= required ? required : count - pos; in read()
307 System.arraycopy(localBuf, pos, buffer, byteOffset, read); in read()
308 pos += read; in read()
[all …]
DLineNumberReader.java115 public int read() throws IOException { in read() method in LineNumberReader
117 int ch = super.read(); in read()
119 ch = super.read(); in read()
148 public int read(char[] buffer, int offset, int count) throws IOException { in read() method in LineNumberReader
150 int read = super.read(buffer, offset, count); in read() local
151 if (read == -1) { in read()
154 for (int i = 0; i < read; i++) { in read()
168 return read; in read()
258 if (read() == -1) { in skip()
DStreamTokenizer.java264 int currentChar = peekChar == -2 ? read() : peekChar; in nextToken()
268 currentChar = read(); in nextToken()
287 if ((currentChar = read()) == '\n') { in nextToken()
288 currentChar = read(); in nextToken()
296 currentChar = read(); in nextToken()
299 currentChar = read(); in nextToken()
320 currentChar = read(); in nextToken()
344 currentChar = read(); in nextToken()
361 int peekOne = read(); in nextToken()
366 int c1 = read(); in nextToken()
[all …]
/libcore/luni/src/main/java/java/sql/
DDataTruncation.java36 private boolean read = false; field in DataTruncation
70 public DataTruncation(int index, boolean parameter, boolean read, in DataTruncation() argument
75 this.read = read; in DataTruncation()
103 public DataTruncation(int index, boolean parameter, boolean read, in DataTruncation() argument
105 super(THE_REASON, read ? THE_SQLSTATE_READ : THE_SQLSTATE_WRITE, in DataTruncation()
109 this.read = read; in DataTruncation()
151 return read; in getRead()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DDeflaterInputStreamTest.java61 assertEquals(120, dis.read()); in testAvailable()
63 assertEquals(22, dis.read(buf, 0, 1024)); in testAvailable()
65 assertEquals(-1, dis.read()); in testAvailable()
91 dis.read(buf, 0, 1024); in testClose()
129 assertEquals(120, dis.read()); in testRead()
131 assertEquals(156, dis.read()); in testRead()
133 assertEquals(243, dis.read()); in testRead()
137 dis.read(); in testRead()
153 while ((bytesRead = dis.read(result, count, 4)) != -1) { in testRead_golden()
185 assertEquals(23, dis.read(buf1, 0, 256)); in testReadByteArrayIntInt()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/channels/
DOldFileChannelTest.java154 fis.read(readBuffer); in test_forceZ()
163 fis.read(readBuffer); in test_forceZ()
263 readOnlyFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument()
270 writeOnlyFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument()
277 readWriteFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument()
286 readOnlyFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument()
294 writeOnlyFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument()
302 readWriteFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument()
312 readOnlyFileChannel.read(null, 0, 1); in test_read$LByteBufferII_Null()
318 readOnlyFileChannel.read(null, 0, 3); in test_read$LByteBufferII_Null()
[all …]

12345678910>>...12