/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | CalendarUtils.java | 70 public static final long floorDivide(long n, long d) { in floorDivide() argument 71 return ((n >= 0) ? in floorDivide() 72 (n / d) : (((n + 1L) / d) - 1L)); in floorDivide() 84 public static final int floorDivide(int n, int d) { in floorDivide() argument 85 return ((n >= 0) ? in floorDivide() 86 (n / d) : (((n + 1) / d) - 1)); in floorDivide() 102 public static final int floorDivide(int n, int d, int[] r) { in floorDivide() argument 103 if (n >= 0) { in floorDivide() 104 r[0] = n % d; in floorDivide() 105 return n / d; in floorDivide() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | IOStatus.java | 59 public static int normalize(int n) { in normalize() argument 60 if (n == UNAVAILABLE) in normalize() 62 return n; in normalize() 65 public static boolean check(int n) { in check() argument 66 return (n >= UNAVAILABLE); in check() 69 public static long normalize(long n) { in normalize() argument 70 if (n == UNAVAILABLE) in normalize() 72 return n; in normalize() 75 public static boolean check(long n) { in check() argument 76 return (n >= UNAVAILABLE); in check() [all …]
|
D | SimpleAsynchronousFileChannelImpl.java | 109 long n = 0L; in size() local 113 n = nd.size(fdObj); in size() 114 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in size() 115 return n; in size() 117 end(n >= 0L); in size() 132 long n = 0L; in truncate() local 136 n = nd.size(fdObj); in truncate() 137 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in truncate() 140 if (size < n && isOpen()) { in truncate() 142 n = nd.truncate(fdObj, size); in truncate() [all …]
|
D | SocketChannelImpl.java | 343 int n = 0; in read() local 421 n = IOUtil.read(fd, buf, -1, nd); in read() 422 if ((n == IOStatus.INTERRUPTED) && isOpen()) { in read() 427 return IOStatus.normalize(n); in read() 448 end(n > 0 || (n == IOStatus.UNAVAILABLE)); in read() 453 if ((n <= 0) && (!isInputOpen)) in read() 457 assert IOStatus.check(n); in read() 471 long n = 0; in read() local 481 n = IOUtil.read(fd, dsts, offset, length, nd); in read() 482 if ((n == IOStatus.INTERRUPTED) && isOpen()) in read() [all …]
|
D | DatagramChannelImpl.java | 361 int n = 0; in receive() local 371 n = receive(fd, dst); in receive() 372 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in receive() 373 if (n == IOStatus.UNAVAILABLE) in receive() 379 n = receive(fd, bb); in receive() 380 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in receive() 381 if (n == IOStatus.UNAVAILABLE) in receive() 391 n = 0; in receive() 404 end((n > 0) || (n == IOStatus.UNAVAILABLE)); in receive() 405 assert IOStatus.check(n); in receive() [all …]
|
D | SinkChannelImpl.java | 160 int n = 0; in write() local 167 n = IOUtil.write(fd, src, -1, nd); in write() 168 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in write() 169 return IOStatus.normalize(n); in write() 172 end((n > 0) || (n == IOStatus.UNAVAILABLE)); in write() 173 assert IOStatus.check(n); in write() 183 long n = 0; in write() local 190 n = IOUtil.write(fd, srcs, nd); in write() 191 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in write() 192 return IOStatus.normalize(n); in write() [all …]
|
D | SourceChannelImpl.java | 165 int n = 0; in read() local 172 n = IOUtil.read(fd, dst, -1, nd); in read() 173 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in read() 174 return IOStatus.normalize(n); in read() 177 end((n > 0) || (n == IOStatus.UNAVAILABLE)); in read() 178 assert IOStatus.check(n); in read() 196 long n = 0; in read() local 203 n = IOUtil.read(fd, dsts, nd); in read() 204 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in read() 205 return IOStatus.normalize(n); in read() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | GZIPInputStream.java | 126 int n = super.read(buf, off, len); in read() local 127 if (n == -1) { in read() 133 crc.update(buf, off, n); in read() 135 return n; in read() 184 int n = 2 + 2 + 6; in readHeader() local 189 n += m + 2; in readHeader() 194 n++; in readHeader() 200 n++; in readHeader() 209 n += 2; in readHeader() 212 return n; in readHeader() [all …]
|
D | DeflaterInputStream.java | 185 int n; in read() local 189 n = in.read(buf, 0, buf.length); in read() 190 if (n < 0) { in read() 193 } else if (n > 0) { in read() 194 def.setInput(buf, 0, n); in read() 199 n = def.deflate(b, off, len); in read() 200 cnt += n; in read() 201 off += n; in read() 202 len -= n; in read() 237 public long skip(long n) throws IOException { in skip() argument [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | BufferedInputStream.java | 248 int n = getInIfOpen().read(buffer, pos, buffer.length - pos); in fill() local 249 if (n > 0) in fill() 250 count = n + pos; in fill() 345 int n = 0; in read() local 347 int nread = read1(b, off + n, len - n); in read() 349 return (n == 0) ? nread : n; in read() 350 n += nread; in read() 351 if (n >= len) in read() 352 return n; in read() 356 return n; in read() [all …]
|
D | Reader.java | 100 int n = read(cbuf, 0, len); in read() local 101 if (n > 0) in read() 102 target.put(cbuf, 0, n); in read() 103 return n; in read() 176 public long skip(long n) throws IOException { in skip() argument 177 if (n < 0L) in skip() 179 int nn = (int) Math.min(n, maxSkipBufferSize); in skip() 183 long r = n; in skip() 190 return n - r; in skip()
|
D | BufferedReader.java | 170 int n; in fill() local 172 n = in.read(cb, dst, cb.length - dst); in fill() 173 } while (n == 0); in fill() 174 if (n > 0) { in fill() 175 nChars = dst + n; in fill() 236 int n = Math.min(len, nChars - nextChar); in read1() local 237 System.arraycopy(cb, nextChar, cbuf, off, n); in read1() 238 nextChar += n; in read1() 239 return n; in read1() 297 int n = read1(cbuf, off, len); in read() local [all …]
|
D | StringReader.java | 99 int n = Math.min(length - next, len); in read() local 100 str.getChars(next, next + n, cbuf, off); in read() 101 next += n; in read() 102 return n; in read() 128 long n = Math.min(length - next, ns); in skip() local 129 n = Math.max(-next, n); in skip() 130 next += n; in skip() 131 return n; in skip()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | StreamLinkTest.java | 49 private <S> Function<S, S> apply(int n, Function<S, S> f) { in apply() argument 51 for (int i = 0; i < n; i++) { in apply() 62 for (int n : sizes) { 63 setContext("n", n); 64 … List<Integer> expected = data.stream().map(e -> (Integer) (e + n)).collect(Collectors.toList()); 67 stream(apply(n, (Stream<Integer> s) -> s.map(e -> (Integer) (e + 1)))). 75 for (int n : sizes) { in testIntManyStreams() 76 setContext("n", n); in testIntManyStreams() 77 int[] expected = data.stream().map(e -> e + n).toArray(); in testIntManyStreams() 80 stream(apply(n, (IntStream s) -> s.map(e -> e + 1))). in testIntManyStreams() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentSkipListMap.java | 600 Node<K,V> n = node; in link() local 602 return n.value != null && casRight(succ, newSucc); in link() 669 Node<K,V> n = r.node; in findPredecessor() local 670 K k = n.key; in findPredecessor() 671 if (n.value == null) { in findPredecessor() 740 for (Node<K,V> b = findPredecessor(key, cmp), n = b.next;;) { in findNode() 742 if (n == null) in findNode() 744 Node<K,V> f = n.next; in findNode() 745 if (n != b.next) // inconsistent read in findNode() 747 if ((v = n.value) == null) { // n is deleted in findNode() [all …]
|
D | PriorityBlockingQueue.java | 264 int n = a.length; in PriorityBlockingQueue() local 267 a = Arrays.copyOf(a, n, Object[].class); in PriorityBlockingQueue() 268 if (screen && (n == 1 || this.comparator != null)) { in PriorityBlockingQueue() 269 for (int i = 0; i < n; ++i) in PriorityBlockingQueue() 274 this.size = n; in PriorityBlockingQueue() 322 int n = size - 1; in dequeue() local 323 if (n < 0) in dequeue() 328 E x = (E) array[n]; in dequeue() 329 array[n] = null; in dequeue() 332 siftDownComparable(0, x, array, n); in dequeue() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | SocketInputStream.java | 148 int n; in read() local 176 n = socketRead(fd, b, off, length, timeout); in read() 177 if (n > 0) { in read() 178 return n; in read() 194 n = socketRead(fd, b, off, length, timeout); in read() 195 if (n > 0) { in read() 196 return n; in read() 229 int n = read(temp, 0, 1); in read() local 230 if (n <= 0) { in read() 246 long n = numbytes; in skip() local [all …]
|
D | URI.java | 1699 int n = s.length(); in equal() local 1700 for (int i = 0; i < n;) { in equal() 1728 int n = s.length(); in equalIgnoringCase() local 1729 if (t.length() != n) in equalIgnoringCase() 1731 for (int i = 0; i < n; i++) { in equalIgnoringCase() 1768 int n = s.length(); in hashIgnoringCase() local 1769 for (int i = 0; i < n; i++) in hashIgnoringCase() 1793 int n = sn < tn ? sn : tn; in compareIgnoringCase() local 1794 for (int i = 0; i < n; i++) { in compareIgnoringCase() 2507 int n = chars.length(); in lowMask() local [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | MeteredStream.java | 59 private final void justRead(long n) throws IOException { in justRead() argument 60 if (n == -1) { in justRead() 72 count += n; in justRead() 133 int n = in.read(b, off, len); in read() local 134 justRead(n); in read() 135 return n; in read() 138 public synchronized long skip(long n) throws IOException { in skip() argument 153 long min = (n > expected - count) ? expected - count: n; in skip() 154 n = in.skip(min); in skip() 156 justRead(n); in skip() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineResultTest.java | 102 for (int n = 0; n < pos.length; n++) { in test_bytesConsumed() 105 enHS[j], pos[n], pos[l]); in test_bytesConsumed() 106 assertEquals("Incorrect bytesConsumed", pos[n], in test_bytesConsumed() 125 for (int n = 0; n < pos.length; n++) { in test_bytesProduced() 128 enHS[j], pos[n], pos[l]); in test_bytesProduced() 148 for (int n = 0; n < pos.length; n++) { in test_getHandshakeStatus() 151 enHS[j], pos[n], pos[l]); in test_getHandshakeStatus() 171 for (int n = 0; n < pos.length; n++) { in test_getStatus() 174 enHS[j], pos[n], pos[l]); in test_getStatus() 194 for (int n = 0; n < pos.length; n++) { in test_toString() [all …]
|
/libcore/ojluni/src/main/native/ |
D | UnixCopyFile.c | 60 ssize_t n, pos, len; in Java_sun_nio_fs_UnixCopyFile_transfer() local 61 RESTARTABLE(read((int)src, &buf, sizeof(buf)), n); in Java_sun_nio_fs_UnixCopyFile_transfer() 62 if (n <= 0) { in Java_sun_nio_fs_UnixCopyFile_transfer() 63 if (n < 0) in Java_sun_nio_fs_UnixCopyFile_transfer() 72 len = n; in Java_sun_nio_fs_UnixCopyFile_transfer() 76 RESTARTABLE(write((int)dst, bufp, len), n); in Java_sun_nio_fs_UnixCopyFile_transfer() 77 if (n == -1) { in Java_sun_nio_fs_UnixCopyFile_transfer() 81 pos += n; in Java_sun_nio_fs_UnixCopyFile_transfer() 82 len -= n; in Java_sun_nio_fs_UnixCopyFile_transfer()
|
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/ |
D | TextImpl.java | 78 for (TextImpl n = firstTextNodeInCurrentRun(); n != null; n = n.nextTextNode()) { in getWholeText() 79 n.appendDataTo(result); in getWholeText() 93 for (TextImpl n = firstTextNodeInCurrentRun(); n != null; ) { in replaceWholeText() 96 if (n == this && content != null && content.length() > 0) { in replaceWholeText() 99 n = n.nextTextNode(); in replaceWholeText() 102 Node toRemove = n; // because removeChild() detaches siblings in replaceWholeText() 103 n = n.nextTextNode(); in replaceWholeText()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | NativeMethodBenchmark.java | 29 NativeTestTarget n = new NativeTestTarget(); in time_emptyJniSynchronizedMethod0() local 31 n.emptyJniSynchronizedMethod0(); in time_emptyJniSynchronizedMethod0() 37 NativeTestTarget n = new NativeTestTarget(); in time_emptyJniMethod0() local 39 n.emptyJniMethod0(); in time_emptyJniMethod0() 46 NativeTestTarget n = new NativeTestTarget(); in time_emptyJniMethod6() local 48 n.emptyJniMethod6(a, b, 1, 2, 3, i); in time_emptyJniMethod6() 53 NativeTestTarget n = new NativeTestTarget(); in time_emptyJniMethod6L() local 55 n.emptyJniMethod6L(null, null, null, null, null, null); in time_emptyJniMethod6L() 79 NativeTestTarget n = new NativeTestTarget(); in time_emptyJniMethod0_Fast() local 81 n.emptyJniMethod0_Fast(); in time_emptyJniMethod0_Fast() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/cs/ |
D | StreamDecoder.java | 130 int n = read(cb, 0, 2); in read0() local 131 switch (n) { in read0() 141 assert false : n; in read0() 159 int n = 0; in read() local 166 n = 1; in read() 169 return n; in read() 176 return (n == 0) ? -1 : n; in read() 178 return n + 1; in read() 181 return n + implRead(cbuf, off, off + len); in read() 281 int n = sun.nio.ch.ChannelInputStream.read(ch, bb, true); in readBytes() local [all …]
|
/libcore/ojluni/src/main/java/java/security/spec/ |
D | ECParameterSpec.java | 44 private final BigInteger n; field in ECParameterSpec 61 BigInteger n, int h) { in ECParameterSpec() argument 68 if (n == null) { in ECParameterSpec() 71 if (n.signum() != 1) { in ECParameterSpec() 79 this.n = n; in ECParameterSpec() 104 return n; in getOrder()
|