Home
last modified time | relevance | path

Searched refs:nread (Results 1 – 8 of 8) sorted by relevance

/libcore/ojluni/src/main/native/
DSocketInputStream.c60 jint fd, nread; in SocketInputStream_socketRead0() local
96 nread = NET_Timeout(fd, timeout); in SocketInputStream_socketRead0()
97 if (nread <= 0) { in SocketInputStream_socketRead0()
98 if (nread == 0) { in SocketInputStream_socketRead0()
101 } else if (nread == JVM_IO_ERR) { in SocketInputStream_socketRead0()
108 } else if (nread == JVM_IO_INTR) { in SocketInputStream_socketRead0()
119 nread = NET_Read(fd, bufP, len); in SocketInputStream_socketRead0()
121 if (nread <= 0) { in SocketInputStream_socketRead0()
122 if (nread < 0) { in SocketInputStream_socketRead0()
147 (*env)->SetByteArrayRegion(env, data, off, nread, (jbyte *)bufP); in SocketInputStream_socketRead0()
[all …]
Dio_util.c41 jint nread; in readSingle() local
48 nread = (jint)IO_Read(fd, &ret, 1); in readSingle()
49 if (nread == 0) { /* EOF */ in readSingle()
51 } else if (nread == JVM_IO_ERR) { /* error */ in readSingle()
53 } else if (nread == JVM_IO_INTR) { in readSingle()
80 jint nread; in readBytes() local
110 nread = -1; in readBytes()
112 nread = (jint)IO_Read(fd, buf, len); in readBytes()
113 if (nread > 0) { in readBytes()
114 (*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf); in readBytes()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DOldAndroidPipedStreamTest.java125 int nread = 0; in testB()
126 while (nread < 5) { in testB()
127 ret = in.read(readBytes, nread, readBytes.length - nread); in testB()
132 nread += ret; in testB()
135 assertEquals(5, nread); in testB()
208 int nread = 0; in testC()
209 while (nread < readBytes.length) { in testC()
210 ret = in.read(readBytes, nread, readBytes.length - nread); in testC()
215 nread += ret; in testC()
/libcore/ojluni/src/main/java/sun/net/www/http/
DChunkedInputStream.java242 int nread; in fastRead() local
244 nread = in.read(b, off, cnt); in fastRead()
249 if (nread > 0) { in fastRead()
250 chunkRead += nread; in fastRead()
254 return nread; in fastRead()
504 int nread; in readAheadNonBlocking() local
506 nread = in.read(rawData, rawCount, avail); in readAheadNonBlocking()
511 if (nread < 0) { in readAheadNonBlocking()
515 rawCount += nread; in readAheadNonBlocking()
550 int nread; in readAheadBlocking() local
[all …]
DHttpClient.java684 int nread = 0; in parseHTTPHeader() local
686 while (nread < 8) { in parseHTTPHeader()
687 int r = serverInput.read(b, nread, 8 - nread); in parseHTTPHeader()
691 nread += r; in parseHTTPHeader()
753 } else if (nread != 8) { in parseHTTPHeader()
/libcore/support/src/test/java/tests/support/
DSupport_TestWebServer.java428 int nread = 0; in parseStatusLine() local
432 nread = readOneLine(is); in parseStatusLine()
434 if (nread == -1) { in parseStatusLine()
484 return nread; in parseStatusLine()
496 int nread = 0; in parseHeader() local
499 nread = readOneLine(is); in parseHeader()
501 if (nread == -1) { in parseHeader()
521 String headerValue = new String(buf, i, nread - i - 2); // drop \r\n in parseHeader()
524 return nread; in parseHeader()
533 int nread = 0; in readHeaders() local
[all …]
/libcore/ojluni/src/main/java/java/io/
DBufferedInputStream.java334 int nread = read1(b, off + n, len - n); in read() local
335 if (nread <= 0) in read()
336 return (n == 0) ? nread : n; in read()
337 n += nread; in read()
DObjectInputStream.java2643 int nread = (int) Math.min(remain, end - pos); in skip() local
2644 remain -= nread; in skip()
2645 pos += nread; in skip()
2647 int nread = (int) Math.min(remain, MAX_BLOCK_SIZE); in skip() local
2648 if ((nread = in.read(buf, 0, nread)) < 0) { in skip()
2651 remain -= nread; in skip()
2713 int nread = Math.min(len, end - pos); in read() local
2714 System.arraycopy(buf, pos, b, off, nread); in read()
2715 pos += nread; in read()
2716 return nread; in read()
[all …]