/sdk/eclipse/plugins/com.android.ide.eclipse.ndk/src/com/android/ide/eclipse/ndk/internal/templates/ |
TemplatedInputStream.java | 40 public int read() throws IOException { method in class:TemplatedInputStream 56 int c = mIn.read(); 59 c = mIn.read(); 63 for (c = mIn.read(); c != '}' && c >= 0; c = mIn.read()) 70 return read(); // recurse to get the real char
|
/libcore/luni/src/test/java/libcore/java/io/ |
OldInputStreamReaderTest.java | 74 reader.read(new char[3], -1, 0); 80 reader.read(new char[3], 0, -1); 86 reader.read(new char[3], 4, 0); 92 reader.read(new char[3], 3, 1); 98 reader.read(new char[3], 1, 3); 104 reader.read(new char[3], 0, 4); 111 reader.read(null, 0, 0); 117 assertEquals(0, reader.read(new char[3], 3, 0)); 119 assertEquals(0, reader.read(chars, 0, 0)); 121 assertEquals(3, reader.read(chars, 0, 3)) [all...] |
OldAndroidPushbackReaderTest.java | 37 Assert.assertEquals("PUSHAbCdEfGhIjKlMnOpQrStUvWxYz", read(a)); 45 Assert.assertEquals("XAbCdEfGhI", read(b, 10)); 58 public static String read(Reader a) throws IOException { method in class:OldAndroidPushbackReaderTest 62 r = a.read(); 69 public static String read(Reader a, int x) throws IOException { method in class:OldAndroidPushbackReaderTest 71 int len = a.read(b, 0, x); 83 r = a.read();
|
OldFilterReaderTest.java | 53 public int read() throws IOException { method in class:OldFilterReaderTest.MockReader 58 public int read(char[] buffer, int offset, int count) throws IOException { method in class:OldFilterReaderTest.MockReader 108 fr.read(); 109 assertTrue("read() has not been called.", called); 114 fr.read(buffer, 0, 5); 115 assertTrue("read(char[], int, int) has not been called.", called); 126 fr.read(buffer, 0, -1); 133 fr.read(buffer, -1, 1); 140 fr.read(buffer, 10, 1);
|
OldPushbackInputStreamTest.java | 111 assertEquals("Test 1: Incorrect byte read;", 66, tobj.read()); 114 tobj.read(); 120 assertEquals("Test 3: Incorrect byte read;", 121 fileString.getBytes()[0], pis.read()); 129 tobj.read(buf, 6, 5); 130 assertEquals("Wrong value read!", "BEGIN", new String(buf, 6, 5)); 131 assertEquals("Too much read!", "012345BEGIN123456789", new String(buf)); 134 tobj.read(buf, 6, 5); 147 tobj.read(buf, -1, 1) [all...] |
OldByteArrayInputStreamTest.java | 89 is.read(); 96 is.read(); 98 fail("Test 2: Should be able to read from closed stream."); 109 is.read(buf1, 0, buf1.length); 111 is.read(buf2, 0, buf2.length); 128 // Test for method int java.io.ByteArrayInputStream.read() 131 int c = is.read(); 133 assertTrue("read returned incorrect char", c == fileString 136 fail("Exception during read test"); 144 is.read(buf1, 0, buf1.length) [all...] |
OldLineNumberReaderTest.java | 53 * java.io.LineNumberReader#read() 58 int c = lnr.read(); 59 assertEquals("Test 1: Read returned incorrect character;", 61 lnr.read(); 62 assertEquals("Test 2: Read failed to increase the line number;", 67 lnr.read(); 75 * java.io.LineNumberReader#read(char[], int, int) 80 lnr.read(c, 0, 4); 81 assertTrue("Test 1: Read returned incorrect characters.", "0\n1\n" 83 assertEquals("Test 2: Read failed to inc lineNumber" [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
DeflaterInputStreamTest.java | 66 assertEquals(120, dis.read()); 68 assertEquals(22, dis.read(buf, 0, 1024)); 70 assertEquals(-1, dis.read()); 96 dis.read(buf, 0, 1024); 129 * DeflaterInputStream#read() 134 assertEquals(120, dis.read()); 136 assertEquals(156, dis.read()); 138 assertEquals(243, dis.read()); 142 dis.read(); 160 while ((bytesRead = dis.read(result, count, 4)) != -1) [all...] |
InflaterInputStreamTest.java | 74 while ((result = inflatIP.read()) != -1) { 93 inflatIP.read(byteArray, 0, 5);// only suppose to read in 5 bytes 110 while ((result = inflatIP.read()) != -1) { 173 * java.util.zip.InflaterInputStream#read() 186 while ((result = inflatIP.read()) != -1) { 200 * java.util.zip.InflaterInputStream#read(byte [], int, int) 210 result = inflatIP.read(null, 0, 1); 216 assertEquals(0, inflatIP.read(b, 0, 0)); 219 result = inflatIP.read(b, 5, 2); //offset highe [all...] |
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/ |
RecyclableBufferedInputStream.java | 44 * The buffer containing the current bytes read from the target InputStream. 78 * Returns an estimated number of bytes that can be read or skipped without blocking for more 132 int result = localIn.read(localBuf); 144 // read is called. 166 int bytesread = localIn.read(localBuf, pos, localBuf.length - pos); 173 * indicates how many bytes can be read before a mark is invalidated. 180 * the number of bytes that can be read before the mark is 213 * @return the byte read or -1 if the end of the source stream has been 219 public synchronized int read() throws IOException { method in class:RecyclableBufferedInputStream 251 * number of bytes actually read or -1 if no bytes were read and the end o 269 public synchronized int read(byte[] buffer, int offset, int byteCount) throws IOException { method in class:RecyclableBufferedInputStream 300 int read; local 386 long read = count - pos; local [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
PushbackReaderTest.java | 42 pbr.read(buf, 0, 5); 66 pbr.read(); 95 * java.io.PushbackReader#read() 98 // Test for method int java.io.PushbackReader.read() 101 pbr.read(); 102 c = (char) pbr.read(); 103 assertTrue("Failed to read char: " + c, c == pbString.charAt(1)); 106 assertTrue("Wrong double byte character", reader.read() == '\u8765'); 108 fail("IOException during read test : " + e.getMessage()); 113 * java.io.PushbackReader#read(char[], int, int [all...] |
ByteArrayInputStreamTest.java | 85 is.read(); 87 is.read(); // Should be able to read from a closed stream 98 is.read(buf1, 0, buf1.length); 100 is.read(buf2, 0, buf2.length); 114 * ByteArrayInputStream#read() 118 int c = isr.read(); 120 assertTrue("read returned incorrect char", c == fileString.charAt(0)); 124 * ByteArrayInputStream#read(byte[], int, int) 130 is.read(buf1, 0, buf1.length) [all...] |
SequenceInputStreamTest.java | 90 si.read(buf, 0, s1.length()); 91 si.read(buf, s1.length(), s2.length()); 92 assertTrue("Read incorrect bytes: " + new String(buf), new String( 95 fail("IOException during read test : " + e.getMessage()); 124 * java.io.SequenceInputStream#read() 127 // Test for method int java.io.SequenceInputStream.read() 129 si.read(); 130 assertTrue("Read incorrect char", (char) si.read() == s1.charAt(1)); 132 fail("IOException during read test: " + e.getMessage()) [all...] |
PipedReaderTest.java | 130 preader.read(c, 0, 11); 132 assertEquals("Read incorrect chars", "Hello World", new String(c)); 147 preader.read(c, 0, 11); 149 assertEquals("Read incorrect chars", "Hello World", new String(c)); 159 * java.io.PipedReader#read() 169 c[i] = (char) preader.read(); 171 assertEquals("Read incorrect chars", "Hello World", new String(c)); 175 * java.io.PipedReader#read(char[], int, int) 187 n = preader.read(c, x, 11 - x); 190 assertEquals("Read incorrect chars", "Hello World", new String(c)) [all...] |
FileInputStreamTest.java | 181 is.read(); 195 fis1.read(); 215 * java.io.FileInputStream#read() 219 int c = isr.read(); 225 * java.io.FileInputStream#read(byte[]) 231 is.read(buf1); 238 * java.io.FileInputStream#read(byte[], int, int) 244 is.read(buf1, 0, buf1.length); 253 in.read(null, 0, 0); 264 * java.io.FileInputStream#read(byte[], int, int [all...] |
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
DigestInputStream2Test.java | 67 // read some data 68 int c = dis.read(); 81 c = dis.read(); 90 * java.security.DigestInputStream#read() 93 // Test for method int java.security.DigestInputStream.read() 96 // read and compare the data that the inStream has 98 while ((c = dis.read()) > -1) { 99 int d = inStream1.read(); 105 * java.security.DigestInputStream#read(byte[], int, int) 108 // Test for method int java.security.DigestInputStream.read(byte [] [all...] |
/external/proguard/src/proguard/io/ |
ManifestRewriter.java | 76 public int read() throws IOException method in class:ManifestRewriter.SplitLineReader 83 super.read(); 94 // It's a newline. Read the second character to see if it's a 96 int c2 = super.read(); 101 c2 = super.read(); 117 public int read(char[] cbuf, int off, int len) throws IOException method in class:ManifestRewriter.SplitLineReader 123 int c = read(); 142 int c = read();
|
/external/apache-http/src/org/apache/http/impl/io/ |
ChunkedInputStream.java | 50 * transfer coding. After the stream is read to the end, it provides access 54 * gets called. Instead, it will read until the "end" of its chunking on 56 * requests, while not requiring the client to remember to read the entire 115 * <p> Trailer headers are read automcatically at the end of the stream and 122 public int read() throws IOException { method in class:ChunkedInputStream 124 throw new IOException("Attempted read from closed stream."); 136 return in.read(); 140 * Read some bytes from the stream. 147 * @see java.io.InputStream#read(byte[], int, int) 150 public int read (byte[] b, int off, int len) throws IOException method in class:ChunkedInputStream 179 public int read (byte[] b) throws IOException { method in class:ChunkedInputStream [all...] |
/external/guava/guava-tests/test/com/google/common/io/ |
MultiReaderTest.java | 62 assertEquals('a', joinedReader.read()); 63 assertEquals('a', joinedReader.read()); 64 assertEquals(-1, joinedReader.read()); 94 assertEquals(expected.charAt(0), joinedReader.read()); 96 assertEquals(expected.charAt(2), joinedReader.read()); 98 assertEquals(expected.charAt(7), joinedReader.read()); 100 assertEquals(expected.charAt(9), joinedReader.read()); 101 assertEquals(-1, joinedReader.read()); 110 assertEquals('a', joinedReader.read());
|
/external/guava/guava/src/com/google/common/io/ |
LineReader.java | 52 * Creates a new instance that will read lines from the given 74 // The default implementation of Reader#read(CharBuffer) allocates a 75 // temporary char[], so we call Reader#read(char[], int, int) instead. 76 int read = (reader != null) local 77 ? reader.read(buf, 0, buf.length) 78 : readable.read(cbuf); 79 if (read == -1) { 83 lineBuf.add(buf, 0, read);
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
Parcelables.java | 46 Parcel read = Parcel.obtain(); local 52 read.unmarshall(data, 0, data.length); 53 read.setDataPosition(0); 54 restored = read.readParcelable(p.getClass().getClassLoader()); 57 read.recycle();
|
/external/tensorflow/tensorflow/core/lib/io/ |
buffered_inputstream_test.cc | 166 string read; local 169 TF_ASSERT_OK(in.ReadNBytes(3, &read)); 170 EXPECT_EQ(read, "012"); 172 TF_ASSERT_OK(in.ReadNBytes(0, &read)); 173 EXPECT_EQ(read, ""); 175 TF_ASSERT_OK(in.ReadNBytes(4, &read)); 176 EXPECT_EQ(read, "3456"); 178 TF_ASSERT_OK(in.ReadNBytes(0, &read)); 179 EXPECT_EQ(read, ""); 181 EXPECT_TRUE(errors::IsOutOfRange(in.ReadNBytes(5, &read))); 203 string read; local 238 string read; local 273 string read; local 310 string read; local 340 string read; local 358 string read; local [all...] |
inputbuffer_test.cc | 159 string read; local 162 TF_CHECK_OK(in.ReadNBytes(3, &read)); 163 EXPECT_EQ(read, "012"); 165 TF_CHECK_OK(in.ReadNBytes(0, &read)); 166 EXPECT_EQ(read, ""); 168 TF_CHECK_OK(in.ReadNBytes(4, &read)); 169 EXPECT_EQ(read, "3456"); 171 TF_CHECK_OK(in.ReadNBytes(0, &read)); 172 EXPECT_EQ(read, ""); 174 EXPECT_TRUE(errors::IsOutOfRange(in.ReadNBytes(5, &read))); 189 char read[5]; local 231 string read; local 266 string read; local [all...] |
/libcore/ojluni/src/main/java/java/io/ |
StreamTokenizer.java | 33 * read one at a time. The parsing process is controlled by a table 38 * Each byte read from the input stream is regarded as a character 75 * be NEED_CHAR to indicate that a new character should be read, or SKIP_LF 76 * to indicate that a new character should be read and, if it is a '\n' 78 * read. 87 /** The line number of the last token read */ 103 * contains the type of the token just read. For a single character 110 * <li>{@code TT_EOL} indicates that the end of line has been read. 131 * A constant indicating that the end of the stream has been read. 136 * A constant indicating that the end of the line has been read 498 private int read() throws IOException { method in class:StreamTokenizer [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
DerInputStream.java | 75 * as read-only. 86 * buffer should be treated as read-only. 90 * be read as DER input in the new stream 103 * buffer should be treated as read-only. 107 * be read as DER input in the new stream 153 * be skipped. If this value is false, the next data read 192 if (buffer.read() != DerValue.tag_Integer) { 204 if (buffer.read() != DerValue.tag_Integer) { 218 if (buffer.read() != DerValue.tag_Integer) { 230 if (buffer.read() != DerValue.tag_Enumerated) [all...] |