Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 299) sorted by relevance

12345678910>>...12

/libcore/ojluni/src/main/java/sun/util/calendar/
DCalendarUtils.java70 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 …]
DCalendarDate.java134 public CalendarDate addYear(int n) { in addYear() argument
135 if (n != 0) { in addYear()
136 year += n; in addYear()
177 public CalendarDate addMonth(int n) { in addMonth() argument
178 if (n != 0) { in addMonth()
179 month += n; in addMonth()
197 public CalendarDate addDayOfMonth(int n) { in addDayOfMonth() argument
198 if (n != 0) { in addDayOfMonth()
199 dayOfMonth += n; in addDayOfMonth()
230 public CalendarDate addHours(int n) { in addHours() argument
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DIOStatus.java58 static int normalize(int n) { in normalize() argument
59 if (n == UNAVAILABLE) in normalize()
61 return n; in normalize()
64 static boolean check(int n) { in check() argument
65 return (n >= UNAVAILABLE); in check()
68 static long normalize(long n) { in normalize() argument
69 if (n == UNAVAILABLE) in normalize()
71 return n; in normalize()
74 static boolean check(long n) { in check() argument
75 return (n >= UNAVAILABLE); in check()
[all …]
DSocketChannelImpl.java304 int n = 0; in read() local
382 n = IOUtil.read(fd, buf, -1, nd); in read()
383 if ((n == IOStatus.INTERRUPTED) && isOpen()) { in read()
388 return IOStatus.normalize(n); in read()
396 remoteAddress.getPort(), 0, n > 0 ? n : 0); in read()
415 end(n > 0 || (n == IOStatus.UNAVAILABLE)); in read()
420 if ((n <= 0) && (!isInputOpen)) in read()
424 assert IOStatus.check(n); in read()
438 long n = 0; in read() local
452 n = IOUtil.read(fd, dsts, offset, length, nd); in read()
[all …]
DFileChannelImpl.java149 int n = 0; in read() local
158 n = IOUtil.read(fd, dst, -1, nd); in read()
159 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in read()
160 return IOStatus.normalize(n); in read()
163 IoTrace.fileReadEnd(traceContext, n > 0 ? n : 0); in read()
164 end(n > 0); in read()
165 assert IOStatus.check(n); in read()
179 long n = 0; in read() local
188 n = IOUtil.read(fd, dsts, offset, length, nd); in read()
189 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in read()
[all …]
DDatagramChannelImpl.java348 int n = 0; in receive() local
358 n = receive(fd, dst); in receive()
359 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in receive()
360 if (n == IOStatus.UNAVAILABLE) in receive()
366 n = receive(fd, bb); in receive()
367 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in receive()
368 if (n == IOStatus.UNAVAILABLE) in receive()
378 n = 0; in receive()
391 end((n > 0) || (n == IOStatus.UNAVAILABLE)); in receive()
392 assert IOStatus.check(n); in receive()
[all …]
DSourceChannelImpl.java165 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 …]
DSinkChannelImpl.java161 int n = 0; in write() local
168 n = IOUtil.write(fd, src, -1, nd); in write()
169 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in write()
170 return IOStatus.normalize(n); in write()
173 end((n > 0) || (n == IOStatus.UNAVAILABLE)); in write()
174 assert IOStatus.check(n); in write()
184 long n = 0; in write() local
191 n = IOUtil.write(fd, srcs, nd); in write()
192 } while ((n == IOStatus.INTERRUPTED) && isOpen()); in write()
193 return IOStatus.normalize(n); in write()
[all …]
/libcore/ojluni/src/main/java/java/util/zip/
DGZIPInputStream.java115 int n = super.read(buf, off, len); in read() local
116 if (n == -1) { in read()
122 crc.update(buf, off, n); in read()
124 return n; in read()
173 int n = 2 + 2 + 6; in readHeader() local
178 n += m + 2; in readHeader()
183 n++; in readHeader()
189 n++; in readHeader()
198 n += 2; in readHeader()
201 return n; in readHeader()
[all …]
DDeflaterInputStream.java186 int n; in read() local
190 n = in.read(buf, 0, buf.length); in read()
191 if (n < 0) { in read()
194 } else if (n > 0) { in read()
195 def.setInput(buf, 0, n); in read()
200 n = def.deflate(b, off, len); in read()
201 cnt += n; in read()
202 off += n; in read()
203 len -= n; in read()
230 public long skip(long n) throws IOException { in skip() argument
[all …]
/libcore/ojluni/src/main/java/java/net/
DSocketInputStream.java124 int n = 0; in read() local
151 n = socketRead0(fd, b, off, length, timeout); in read()
152 if (n > 0) { in read()
153 return n; in read()
159 timeout, n > 0 ? n : 0); in read()
170 n = socketRead0(fd, b, off, length, timeout); in read()
171 if (n > 0) { in read()
172 return n; in read()
177 timeout, n > 0 ? n : 0); in read()
206 int n = read(temp, 0, 1); in read() local
[all …]
DURI.java1698 int n = s.length(); in equal() local
1699 for (int i = 0; i < n;) { in equal()
1727 int n = s.length(); in equalIgnoringCase() local
1728 if (t.length() != n) in equalIgnoringCase()
1730 for (int i = 0; i < n; i++) { in equalIgnoringCase()
1748 int n = s.length(); in hashIgnoringCase() local
1749 for (int i = 0; i < n; i++) in hashIgnoringCase()
1773 int n = sn < tn ? sn : tn; in compareIgnoringCase() local
1774 for (int i = 0; i < n; i++) { in compareIgnoringCase()
2472 int n = chars.length(); in lowMask() local
[all …]
/libcore/ojluni/src/main/java/java/io/
DBufferedInputStream.java235 int n = getInIfOpen().read(buffer, pos, buffer.length - pos); in fill() local
236 if (n > 0) in fill()
237 count = n + pos; in fill()
332 int n = 0; in read() local
334 int nread = read1(b, off + n, len - n); in read()
336 return (n == 0) ? nread : n; in read()
337 n += nread; in read()
338 if (n >= len) in read()
339 return n; in read()
343 return n; in read()
[all …]
DReader.java100 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()
DStringReader.java99 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()
DBufferedReader.java170 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 …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DStreamLinkTest.java49 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/sun/net/www/
DMeteredStream.java60 private final void justRead(long n) throws IOException { in justRead() argument
61 if (n == -1) { in justRead()
73 count += n; in justRead()
134 int n = in.read(b, off, len); in read() local
135 justRead(n); in read()
136 return n; in read()
139 public synchronized long skip(long n) throws IOException { in skip() argument
147 n = in.skip(n); in skip()
151 long min = (n > expected - count) ? expected - count: n; in skip()
152 n = in.skip(min); in skip()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DConcurrentSkipListMap.java571 Node<K,V> n = node; in link() local
573 return n.value != null && casRight(succ, newSucc); in link()
640 Node<K,V> n = r.node; in findPredecessor() local
641 K k = n.key; in findPredecessor()
642 if (n.value == null) { in findPredecessor()
711 for (Node<K,V> b = findPredecessor(key, cmp), n = b.next;;) { in findNode()
713 if (n == null) in findNode()
715 Node<K,V> f = n.next; in findNode()
716 if (n != b.next) // inconsistent read in findNode()
718 if ((v = n.value) == null) { // n is deleted in findNode()
[all …]
DPriorityBlockingQueue.java235 int n = a.length; in PriorityBlockingQueue() local
238 a = Arrays.copyOf(a, n, Object[].class); in PriorityBlockingQueue()
239 if (screen && (n == 1 || this.comparator != null)) { in PriorityBlockingQueue()
240 for (int i = 0; i < n; ++i) in PriorityBlockingQueue()
245 this.size = n; in PriorityBlockingQueue()
293 int n = size - 1; in dequeue() local
294 if (n < 0) in dequeue()
299 E x = (E) array[n]; in dequeue()
300 array[n] = null; in dequeue()
303 siftDownComparable(0, x, array, n); in dequeue()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DTextImpl.java78 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/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineResultTest.java102 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/java/java/security/spec/
DECParameterSpec.java44 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()
/libcore/ojluni/src/main/java/sun/nio/cs/
DStreamDecoder.java128 int n = read(cb, 0, 2); in read0() local
129 switch (n) { in read0()
139 assert false : n; in read0()
157 int n = 0; in read() local
164 n = 1; in read()
167 return n; in read()
174 return (n == 0) ? -1 : n; in read()
176 return n + 1; in read()
179 return n + implRead(cbuf, off, off + len); in read()
277 int n = sun.nio.ch.ChannelInputStream.read(ch, bb); in readBytes() local
[all …]
/libcore/ojluni/src/main/java/sun/security/ssl/
DHandshakeInStream.java85 int n = r.read(); in read() local
86 if (n == -1) { in read()
89 return n; in read()
98 int n = r.read(b, off, len); in read() local
99 if (n != len) { in read()
102 return n; in read()
108 public long skip(long n) throws IOException { in skip() argument
109 return r.skip(n); in skip()
158 void ignore(int n) { in ignore() argument
159 r.ignore(n); in ignore()

12345678910>>...12