/libcore/ojluni/src/main/java/java/lang/ |
D | AbstractStringBuilder.java | 72 int count; field in AbstractStringBuilder 108 int count1 = this.count; in compareTo() 109 int count2 = another.count; in compareTo() 130 return count; in length() 234 StringLatin1.inflate(value, 0, buf, 0, count); in inflate() 247 int length = count << coder; in trimToSize() 283 if (count < newLength) { in setLength() 285 StringLatin1.fillNull(value, count, newLength); in setLength() 287 StringUTF16.fillNull(value, count, newLength); in setLength() 290 count = newLength; in setLength() [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() 126 if (len > buf.length - count) { in write() 129 System.arraycopy(b, off, buf, count, len); in write() 130 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 | DoubleSummaryStatistics.java | 65 private long count; field in DoubleSummaryStatistics 109 public DoubleSummaryStatistics(long count, double min, double max, double sum) in DoubleSummaryStatistics() argument 111 if (count < 0L) { in DoubleSummaryStatistics() 113 } else if (count > 0L) { in DoubleSummaryStatistics() 118 var ncount = DoubleStream.of(min, max, sum).filter(Double::isNaN).count(); in DoubleSummaryStatistics() 122 this.count = count; in DoubleSummaryStatistics() 139 ++count; in accept() 154 count += other.count; in combine() 179 return count; in getCount()
|
/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 285 count.set(n); in LinkedBlockingQueue() 299 return count.get(); in size() 316 return capacity - count.get(); in remainingCapacity() 331 final AtomicInteger count = this.count; in put() local 342 while (count.get() == capacity) { in put() 346 c = count.getAndIncrement(); in put() 372 final AtomicInteger count = this.count; in offer() local 375 while (count.get() == capacity) { in offer() 381 c = count.getAndIncrement(); in offer() [all …]
|
D | ArrayBlockingQueue.java | 113 int count; field in ArrayBlockingQueue 186 count++; in enqueue() 203 count--; in dequeue() 225 count--; in removeAt() 242 count--; in removeAt() 310 count = i; in ArrayBlockingQueue() 346 if (count == items.length) in offer() 369 while (count == items.length) in put() 393 while (count == items.length) { in offer() 409 return (count == 0) ? null : dequeue(); in poll() [all …]
|
/libcore/ojluni/src/test/java/lang/StackWalker/ |
D | MultiThreadStackWalk.java | 135 final long count = frameCounter.getAndIncrement(); in consume() local 138 .append(count) in consume() 155 if (count == max) { in consume() 158 if (count == checkMarkAt) { in consume() 160 throw new RuntimeException("Expected Marker at " + count in consume() 164 if (count <= 0 && sfi.getDeclaringClass() != MultiThreadStackWalk.Call.class) { in consume() 165 throw new RuntimeException("Expected Call at " + count in consume() 167 …} else if (count > 0 && count < max && sfi.getDeclaringClass() != MultiThreadStackWalk.Test.class)… in consume() 168 throw new RuntimeException("Expected Test at " + count in consume() 170 } else if (count == max && sfi.getDeclaringClass() != MultiThreadStackWalk.class) { in consume() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 841 int count = 0; in compile() local 855 if (count != 0) { in compile() 856 encode(lastTag, count, compiledCode); in compile() 865 count = 0; in compile() 876 if (count != 0) { in compile() 877 encode(lastTag, count, compiledCode); in compile() 886 count = 0; in compile() 917 if (count != 0) { in compile() 918 encode(lastTag, count, compiledCode); in compile() 927 count = 0; in compile() [all …]
|
/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/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()
|