/libcore/ojluni/src/main/java/java/lang/ |
D | AbstractStringBuilder.java | 57 int count; field in AbstractStringBuilder 80 return count; in length() 176 if (count < value.length) { in trimToSize() 177 value = Arrays.copyOf(value, count); in trimToSize() 211 if (count < newLength) { in setLength() 212 Arrays.fill(value, count, newLength, '\0'); in setLength() 215 count = newLength; in setLength() 237 if ((index < 0) || (index >= count)) in charAt() 264 if ((index < 0) || (index >= count)) { in codePointAt() 267 return Character.codePointAtImpl(value, index, count); in codePointAt() [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_StringReader.java | 30 private int count; field in Support_StringReader 43 this.count = str.length(); in Support_StringReader() 121 if (pos != count) { in read() 148 public int read(char buf[], int offset, int count) throws IOException { in read() argument 150 if (0 <= offset && offset <= buf.length && 0 <= count in read() 151 && count <= buf.length - offset) { in read() 154 if (pos == this.count) { in read() 157 int end = pos + count > this.count ? this.count : pos in read() 158 + count; in read() 228 public long skip(long count) throws IOException { in skip() argument [all …]
|
D | Streams.java | 39 int count; in streamToBytes() local 40 while ((count = source.read(buffer)) != -1) { in streamToBytes() 41 out.write(buffer, 0, count); in streamToBytes() 52 int count; in streamToString() local 53 while ((count = fileReader.read(buffer)) != -1) { in streamToString() 54 out.write(buffer, 0, count); in streamToString()
|
D | Support_StringWriter.java | 113 public void write(char[] buf, int offset, int count) { in write() argument 115 if (0 <= offset && offset <= buf.length && 0 <= count in write() 116 && count <= buf.length - offset) { in write() 118 this.buf.append(buf, offset, count); in write() 172 public void write(String str, int offset, int count) { in write() argument 173 String sub = str.substring(offset, offset + count); in write()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | CountLargeTest.java | 44 long count = LongStream.range(0, EXPECTED_LARGE_COUNT) in testRefLarge() local 45 .mapToObj(e -> null).count(); in testRefLarge() 47 assertEquals(count, EXPECTED_LARGE_COUNT); in testRefLarge() 51 long count = LongStream.range(0, EXPECTED_LARGE_COUNT) in testIntLarge() local 52 .mapToInt(e -> 0).count(); in testIntLarge() 54 assertEquals(count, EXPECTED_LARGE_COUNT); in testIntLarge() 58 long count = LongStream.range(0, EXPECTED_LARGE_COUNT) in testLongLarge() local 59 .count(); in testLongLarge() 61 assertEquals(count, EXPECTED_LARGE_COUNT); in testLongLarge() 65 long count = LongStream.range(0, EXPECTED_LARGE_COUNT) in testDoubleLarge() local [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | ByteArrayOutputStream.java | 57 protected int count; field in ByteArrayOutputStream 137 ensureCapacity(count + 1); in write() 138 buf[count] = (byte) b; in write() 139 count += 1; in write() 156 ensureCapacity(count + len); in write() 157 System.arraycopy(b, off, buf, count, len); in write() 158 count += len; in write() 187 out.write(buf, 0, count); in writeTo() 199 count = 0; in reset() 211 return Arrays.copyOf(buf, count); in toByteArray() [all …]
|
D | CharArrayWriter.java | 52 protected int count; field in CharArrayWriter 80 int newcount = count + 1; in write() 84 buf[count] = (char)c; in write() 85 count = newcount; in write() 108 int newcount = count + len; in write() 112 System.arraycopy(c, off, buf, count, len); in write() 113 count = newcount; in write() 130 int newcount = count + len; in write() 134 str.getChars(off, off + len, buf, count); in write() 135 count = newcount; in write() [all …]
|
D | DataInputStream.java | 203 int count = in.read(b, off + n, len - n); in readFully() local 204 if (count < 0) in readFully() 206 n += count; in readFully() 608 int count = 0; in readUTF() local 613 while (count < utflen) { in readUTF() 614 c = (int) bytearr[count] & 0xff; in readUTF() 616 count++; in readUTF() 620 while (count < utflen) { in readUTF() 621 c = (int) bytearr[count] & 0xff; in readUTF() 625 count++; in readUTF() [all …]
|
D | ByteArrayInputStream.java | 91 protected int count; field in ByteArrayInputStream 108 this.count = buf.length; in ByteArrayInputStream() 128 this.count = Math.min(offset + length, buf.length); in ByteArrayInputStream() 146 return (pos < count) ? (buf[pos++] & 0xff) : -1; in read() 175 if (pos >= count) { in read() 179 int avail = count - pos; in read() 192 byte[] result = Arrays.copyOfRange(buf, pos, count); in readAllBytes() 193 pos = count; in readAllBytes() 203 int len = count - pos; in transferTo() 205 pos = count; in transferTo() [all …]
|
D | BufferedOutputStream.java | 49 protected int count; field in BufferedOutputStream 80 if (count > 0) { in flushBuffer() 81 out.write(buf, 0, count); in flushBuffer() 82 count = 0; in flushBuffer() 94 if (count >= buf.length) { in write() 97 buf[count++] = (byte)b; in write() 125 if (len > buf.length - count) { in write() 128 System.arraycopy(b, off, buf, count, len); in write() 129 count += len; in write()
|
D | StringBufferInputStream.java | 65 protected int count; field in StringBufferInputStream 74 count = s.length(); in StringBufferInputStream() 92 return (pos < count) ? (buffer.charAt(pos++) & 0xFF) : -1; in read() 119 if (pos >= count) { in read() 123 int avail = count - pos; in read() 147 if (n > count - pos) { in skip() 148 n = count - pos; in skip() 162 return count - pos; in available()
|
D | CharArrayReader.java | 49 protected int count; field in CharArrayReader 58 this.count = buf.length; in CharArrayReader() 85 this.count = Math.min(offset + length, buf.length); in CharArrayReader() 103 if (pos >= count) in read() 131 if (pos >= count) { in read() 135 int avail = count - pos; in read() 164 long avail = count - pos; in skip() 185 return (count - pos) > 0; in ready()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/ |
D | JarInputStreamTest.java | 163 int count = 0; in test_JarInputStream_Integrate_Jar_getNextEntry() local 164 while (count == 0 || entry != null) { in test_JarInputStream_Integrate_Jar_getNextEntry() 165 count++; in test_JarInputStream_Integrate_Jar_getNextEntry() 168 assertEquals(TOTAL_ENTRIES + 1, count); in test_JarInputStream_Integrate_Jar_getNextEntry() 180 int count = 0; in test_JarInputStream_Modified_Class_getNextEntry() local 181 while (count == 0 || zipEntry != null) { in test_JarInputStream_Modified_Class_getNextEntry() 182 count++; in test_JarInputStream_Modified_Class_getNextEntry() 185 if (count == TEST_CLASS_INDEX + 1) { in test_JarInputStream_Modified_Class_getNextEntry() 189 if (count != TEST_CLASS_INDEX + 1) { in test_JarInputStream_Modified_Class_getNextEntry() 195 assertEquals(TOTAL_ENTRIES + 2, count); in test_JarInputStream_Modified_Class_getNextEntry() [all …]
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | Streams.java | 306 int count; field in Streams.AbstractStreamBuilderImpl 319 return -count - 1; in estimateSize() 352 count = -2; in StreamBuilderImpl() 359 if (count == 0) { in accept() 361 count++; in accept() 363 else if (count > 0) { in accept() 367 count++; in accept() 384 int c = count; in build() 387 count = -count - 1; in build() 404 if (count == -2) { in tryAdvance() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | IntSummaryStatistics.java | 66 private long count; field in IntSummaryStatistics 108 public IntSummaryStatistics(long count, int min, int max, long sum) in IntSummaryStatistics() argument 110 if (count < 0L) { in IntSummaryStatistics() 112 } else if (count > 0L) { in IntSummaryStatistics() 115 this.count = count; in IntSummaryStatistics() 130 ++count; in accept() 143 count += other.count; in combine() 155 return count; in getCount()
|
D | LongSummaryStatistics.java | 67 private long count; field in LongSummaryStatistics 109 public LongSummaryStatistics(long count, long min, long max, long sum) in LongSummaryStatistics() argument 111 if (count < 0L) { in LongSummaryStatistics() 113 } else if (count > 0L) { in LongSummaryStatistics() 116 this.count = count; in LongSummaryStatistics() 141 ++count; in accept() 155 count += other.count; in combine() 167 return count; in getCount()
|
D | DualPivotQuicksort.java | 115 int count = 0; run[0] = left; in sort() local 118 for (int k = left; k < right; run[count] = k) { in sort() 128 for (int lo = run[count] - 1, hi = k; ++lo < --hi; ) { in sort() 135 if (run[count] > left && a[run[count]] >= a[run[count] - 1]) { in sort() 136 count--; in sort() 143 if (++count == MAX_RUN_COUNT) { in sort() 153 if (count == 0) { in sort() 156 } else if (count == 1 && run[count] > right) { in sort() 163 if (run[count] < right) { in sort() 168 run[++count] = right; in sort() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SourceChannelTest.java | 69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable() local 70 assertEquals(1, count); in test_read_LByteBuffer_DataAvailable() 93 long count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed() local 94 assertEquals(BUFFER_SIZE, count); in test_read_LByteBuffer_SinkClosed() 96 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed() 97 assertEquals(0, count); in test_read_LByteBuffer_SinkClosed() 100 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed() 101 assertEquals(-1, count); in test_read_LByteBuffer_SinkClosed() 176 long count = source.read(readBufArray); in test_read_$LByteBuffer() local 177 if (count < 0) { in test_read_$LByteBuffer() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | MeteredStream.java | 42 protected long count = 0; field in MeteredStream 72 count += n; in justRead() 77 if (count - markedCount > markLimit) { in justRead() 82 pi.updateProgress(count, expected); in justRead() 91 if (count >= expected) { in justRead() 107 if (count - markedCount > markLimit) { in isMarked() 153 long min = (n > expected - count) ? expected - count: n; in skip() 187 markedCount = count; in mark() 200 count = markedCount; in reset()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | LinkedBlockingQueue.java | 141 private final AtomicInteger count = new AtomicInteger(); field in LinkedBlockingQueue 283 count.set(n); in LinkedBlockingQueue() 297 return count.get(); in size() 314 return capacity - count.get(); in remainingCapacity() 329 final AtomicInteger count = this.count; in put() local 340 while (count.get() == capacity) { in put() 344 c = count.getAndIncrement(); in put() 370 final AtomicInteger count = this.count; in offer() local 373 while (count.get() == capacity) { in offer() 379 c = count.getAndIncrement(); in offer() [all …]
|
D | ArrayBlockingQueue.java | 112 int count; field in ArrayBlockingQueue 183 count++; in enqueue() 200 count--; in dequeue() 222 count--; in removeAt() 239 count--; in removeAt() 307 count = i; in ArrayBlockingQueue() 343 if (count == items.length) in offer() 366 while (count == items.length) in put() 390 while (count == items.length) { in offer() 406 return (count == 0) ? null : dequeue(); in poll() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 837 int count = 0; in compile() local 851 if (count != 0) { in compile() 852 encode(lastTag, count, compiledCode); in compile() 861 count = 0; in compile() 872 if (count != 0) { in compile() 873 encode(lastTag, count, compiledCode); in compile() 882 count = 0; in compile() 913 if (count != 0) { in compile() 914 encode(lastTag, count, compiledCode); in compile() 923 count = 0; in compile() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | WriterTest.java | 121 public void write(char[] buffer, int offset, int count) in write() argument 126 if (offset < 0 || count < 0 || offset >= buffer.length) { in write() 129 count = Math.min(count, buffer.length - offset); in write() 130 count = Math.min(count, this.length - this.offset); in write() 131 for (int i = 0; i < count; i++) { in write() 134 this.offset += count; in write()
|
/libcore/benchmarks/src/benchmarks/ |
D | ReferenceBenchmark.java | 93 AtomicInteger count; field in ReferenceBenchmark.FinalizableObject 95 public FinalizableObject(AtomicInteger count) { in FinalizableObject() argument 96 this.count = count; in FinalizableObject() 101 count.incrementAndGet(); in finalize() 109 AtomicInteger count = new AtomicInteger(0); in timeFinalization() local 111 new FinalizableObject(count); in timeFinalization() 121 int got = count.get(); in timeFinalization()
|
/libcore/ojluni/src/main/java/java/util/logging/ |
D | FileHandler.java | 155 private int count; field in FileHandler 231 count = manager.getIntProperty(cname + ".count", 1); in configure() 232 if (count <= 0) { in configure() 233 count = 1; in configure() 292 this.count = 1; in FileHandler() 325 this.count = 1; in FileHandler() 353 public FileHandler(String pattern, int limit, int count) in FileHandler() argument 355 if (limit < 0 || count < 1 || pattern.length() < 1) { in FileHandler() 362 this.count = count; in FileHandler() 392 public FileHandler(String pattern, int limit, int count, boolean append) in FileHandler() argument [all …]
|