Home
last modified time | relevance | path

Searched refs:remaining (Results 1 – 25 of 89) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/nio/
DCharBuffer.java253 int targetRemaining = target.remaining(); in read()
254 int remaining = remaining(); in read() local
255 if (remaining == 0) in read()
257 int n = Math.min(remaining, targetRemaining); in read()
260 if (targetRemaining < remaining) in read()
520 if (length > remaining()) in get()
600 int n = src.remaining(); in put()
601 if (n > remaining()) in put()
661 if (length > remaining()) in put()
761 if (end - start > remaining()) in put()
[all …]
DHeapLongBuffer.java80 this.remaining(), in slice()
81 this.remaining(), in slice()
120 if (length > remaining()) in get()
156 if (length > remaining()) in put()
172 int n = sb.remaining(); in put()
173 if (n > remaining()) in put()
180 int n = src.remaining(); in put()
181 if (n > remaining()) in put()
195 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
196 position(remaining()); in compact()
DHeapDoubleBuffer.java80 this.remaining(), in slice()
81 this.remaining(), in slice()
119 if (length > remaining()) in get()
155 if (length > remaining()) in put()
171 int n = sb.remaining(); in put()
172 if (n > remaining()) in put()
179 int n = src.remaining(); in put()
180 if (n > remaining()) in put()
194 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
195 position(remaining()); in compact()
DHeapIntBuffer.java79 this.remaining(), in slice()
80 this.remaining(), in slice()
119 if (length > remaining()) in get()
155 if (length > remaining()) in put()
171 int n = sb.remaining(); in put()
172 if (n > remaining()) in put()
179 int n = src.remaining(); in put()
180 if (n > remaining()) in put()
194 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
195 position(remaining()); in compact()
DHeapShortBuffer.java79 this.remaining(), in slice()
80 this.remaining(), in slice()
119 if (length > remaining()) in get()
155 if (length > remaining()) in put()
171 int n = sb.remaining(); in put()
172 if (n > remaining()) in put()
179 int n = src.remaining(); in put()
180 if (n > remaining()) in put()
194 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
195 position(remaining()); in compact()
DHeapFloatBuffer.java79 this.remaining(), in slice()
80 this.remaining(), in slice()
118 if (length > remaining()) in get()
154 if (length > remaining()) in put()
170 int n = sb.remaining(); in put()
171 if (n > remaining()) in put()
178 int n = src.remaining(); in put()
179 if (n > remaining()) in put()
193 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
194 position(remaining()); in compact()
DHeapCharBuffer.java79 this.remaining(), in slice()
80 this.remaining(), in slice()
124 if (length > remaining()) in get()
160 if (length > remaining()) in put()
176 int n = sb.remaining(); in put()
177 if (n > remaining()) in put()
184 int n = src.remaining(); in put()
185 if (n > remaining()) in put()
199 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
200 position(remaining()); in compact()
DIntBuffer.java393 if (length > remaining()) in get()
473 int n = src.remaining(); in put()
474 if (n > remaining()) in put()
534 if (length > remaining()) in put()
798 if (this.remaining() != that.remaining()) in equals()
838 int n = this.position() + Math.min(this.remaining(), that.remaining()); in compareTo()
844 return this.remaining() - that.remaining(); in compareTo()
DShortBuffer.java392 if (length > remaining()) in get()
472 int n = src.remaining(); in put()
473 if (n > remaining()) in put()
533 if (length > remaining()) in put()
791 if (this.remaining() != that.remaining()) in equals()
831 int n = this.position() + Math.min(this.remaining(), that.remaining()); in compareTo()
837 return this.remaining() - that.remaining(); in compareTo()
DLongBuffer.java392 if (length > remaining()) in get()
472 int n = src.remaining(); in put()
473 if (n > remaining()) in put()
533 if (length > remaining()) in put()
791 if (this.remaining() != that.remaining()) in equals()
831 int n = this.position() + Math.min(this.remaining(), that.remaining()); in compareTo()
837 return this.remaining() - that.remaining(); in compareTo()
DDoubleBuffer.java392 if (length > remaining()) in get()
472 int n = src.remaining(); in put()
473 if (n > remaining()) in put()
533 if (length > remaining()) in put()
797 if (this.remaining() != that.remaining()) in equals()
834 int n = this.position() + Math.min(this.remaining(), that.remaining()); in compareTo()
840 return this.remaining() - that.remaining(); in compareTo()
DFloatBuffer.java392 if (length > remaining()) in get()
472 int n = src.remaining(); in put()
473 if (n > remaining()) in put()
533 if (length > remaining()) in put()
797 if (this.remaining() != that.remaining()) in equals()
837 int n = this.position() + Math.min(this.remaining(), that.remaining()); in compareTo()
843 return this.remaining() - that.remaining(); in compareTo()
DByteBuffer.java529 if (length > remaining()) in get()
609 int n = src.remaining(); in put()
610 if (n > remaining()) in put()
701 if (length > remaining()) in put()
974 if (this.remaining() != that.remaining()) in equals()
1014 int n = this.position() + Math.min(this.remaining(), that.remaining()); in compareTo()
1020 return this.remaining() - that.remaining(); in compareTo()
DHeapByteBuffer.java78 remaining(), in slice()
79 remaining(), in slice()
122 if (length > remaining()) in get()
163 if (length > remaining()) in put()
175 System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); in compact()
176 position(remaining()); in compact()
245 int size = this.remaining() >> 1; in asCharBuffer()
306 int size = this.remaining() >> 1; in asShortBuffer()
367 int size = this.remaining() >> 2; in asIntBuffer()
429 int size = this.remaining() >> 3; in asLongBuffer()
[all …]
/libcore/ojluni/src/main/java/java/io/
DInputStream.java214 long remaining = n; in skip() local
221 int size = (int)Math.min(MAX_SKIP_BUFFER_SIZE, remaining); in skip()
223 while (remaining > 0) { in skip()
224 nr = read(skipBuffer, 0, (int)Math.min(size, remaining)); in skip()
228 remaining -= nr; in skip()
231 return n - remaining; in skip()
DLineNumberInputStream.java181 long remaining = n; in skip() local
190 while (remaining > 0) { in skip()
191 nr = read(data, 0, (int) Math.min(chunk, remaining)); in skip()
195 remaining -= nr; in skip()
198 return n - remaining; in skip()
/libcore/ojluni/src/main/java/java/util/concurrent/
DSemaphore.java186 int remaining = available - acquires; in nonfairTryAcquireShared() local
187 if (remaining < 0 || in nonfairTryAcquireShared()
188 compareAndSetState(available, remaining)) in nonfairTryAcquireShared()
189 return remaining; in nonfairTryAcquireShared()
254 int remaining = available - acquires; in tryAcquireShared() local
255 if (remaining < 0 || in tryAcquireShared()
256 compareAndSetState(available, remaining)) in tryAcquireShared()
257 return remaining; in tryAcquireShared()
/libcore/ojluni/src/main/native/
DPollArrayWrapper.c45 int remaining = timeout; in ipoll() local
53 int res = poll(fds, nfds, remaining); in ipoll()
55 if (remaining >= 0) { in ipoll()
59 remaining -= diff; in ipoll()
60 if (diff < 0 || remaining <= 0) { in ipoll()
/libcore/ojluni/src/main/java/java/util/zip/
DZipInputStream.java50 private long remaining; field in ZipInputStream
133 remaining = entry.size; in getNextEntry()
171 if (entryEOF || (entry != null && remaining == 0)) { in available()
218 remaining -= len; in read()
222 if (remaining <= 0) { in read()
227 if (len > remaining) { in read()
228 len = (int)remaining; in read()
235 remaining -= len; in read()
236 if (remaining == 0 && entry.crc != crc.getValue()) { in read()
/libcore/ojluni/src/main/java/sun/nio/ch/
DIOVecWrapper.java60 private final int[] remaining; field in IOVecWrapper
89 this.remaining = new int[size]; in IOVecWrapper()
113 this.remaining[i] = rem; in setBuffer()
129 return remaining[i]; in getRemaining()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DByteBufferTest.java818 assertEquals(slice.limit(), buf.remaining()); in testSlice()
819 assertEquals(slice.capacity(), buf.remaining()); in testSlice()
854 while (charBuffer.remaining() > 0) { in testAsCharBuffer()
865 while (charBuffer.remaining() > 0) { in testAsCharBuffer()
877 while (charBuffer.remaining() > 0) { in testAsCharBuffer()
878 value = (char) charBuffer.remaining(); in testAsCharBuffer()
889 while (charBuffer.remaining() > 0) { in testAsCharBuffer()
890 value = (char) charBuffer.remaining(); in testAsCharBuffer()
910 while (doubleBuffer.remaining() > 0) { in testAsDoubleBuffer()
924 while (doubleBuffer.remaining() > 0) { in testAsDoubleBuffer()
[all …]
/libcore/luni/src/main/java/libcore/io/
DLinux.java143 bytesRead = preadBytes(fd, buffer, position, buffer.remaining(), offset); in pread()
145 …ls.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), offset); in pread()
161 bytesWritten = pwriteBytes(fd, buffer, position, buffer.remaining(), offset); in pwrite()
163 …ls.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), offset); in pwrite()
179 bytesRead = readBytes(fd, buffer, position, buffer.remaining()); in read()
181 …, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining()); in read()
200 … bytesReceived = recvfromBytes(fd, buffer, position, buffer.remaining(), flags, srcAddress); in recvfrom()
202 …afeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), flags, srcAdd… in recvfrom()
222 … bytesSent = sendtoBytes(fd, buffer, position, buffer.remaining(), flags, inetAddress, port); in sendto()
224 …afeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), flags, inetAd… in sendto()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixPath.java490 int remaining = count; // number of names remaining in normalize() local
511 remaining--; in normalize()
524 prevRemaining = remaining; in normalize()
548 remaining = remaining - 2; in normalize()
563 remaining--; in normalize()
568 } while (prevRemaining > remaining); in normalize()
572 if (remaining == count) in normalize()
576 if (remaining == 0) { in normalize()
581 int len = remaining - 1; in normalize()
599 if (--remaining > 0) { in normalize()
/libcore/ojluni/src/main/java/java/nio/charset/
DCharsetDecoder.java593 cr = CoderResult.malformedForLength(in.remaining()); in decode()
612 if (out.remaining() < replacement.length()) in decode()
796 int n = (int)(in.remaining() * averageCharsPerByte()); in decode()
799 if ((n == 0) && (in.remaining() == 0)) in decode()
DCharsetEncoder.java371 CharBuffer cb = CharBuffer.allocate((int)(bb.remaining() in isLegalReplacement()
611 cr = CoderResult.malformedForLength(in.remaining()); in encode()
630 if (out.remaining() < replacement.length) in encode()
814 int n = (int)(in.remaining() * averageBytesPerChar()); in encode()
817 if ((n == 0) && (in.remaining() == 0)) in encode()

1234