Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 261) sorted by relevance

1234567891011

/libcore/ojluni/src/main/java/java/lang/
DAbstractStringBuilder.java52 int count; field in AbstractStringBuilder
74 return count; in length()
141 if (count < value.length) { in trimToSize()
142 value = Arrays.copyOf(value, count); in trimToSize()
176 if (count < newLength) { in setLength()
177 for (; count < newLength; count++) in setLength()
178 value[count] = '\0'; in setLength()
180 count = newLength; in setLength()
202 if ((index < 0) || (index >= count)) in charAt()
229 if ((index < 0) || (index >= count)) { in codePointAt()
[all …]
DString.java120 private final int count; field in String
200 public String(char value[], int offset, int count) { in String() argument
232 public String(int[] codePoints, int offset, int count) { in String() argument
276 public String(byte ascii[], int hibyte, int offset, int count) { in String() argument
528 String(int offset, int count, char[] value) { in String() argument
541 return count; in length()
553 return count == 0; in isEmpty()
601 if ((index < 0) || (index >= count)) { in codePointAt()
631 if ((i < 0) || (i >= count)) { in codePointBefore()
659 if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) { in codePointCount()
[all …]
/libcore/ojluni/src/main/java/java/text/
DDigitList.java103 public int count = 0; field in DigitList
114 for (int i=0; i < count; ++i) { in isZero()
138 count = 0; in clear()
145 if (count == digits.length) { in append()
146 char[] data = new char[count + 100]; in append()
147 System.arraycopy(digits, 0, data, 0, count); in append()
150 digits[count++] = digit; in append()
159 if (count == 0) { in getDouble()
165 temp.append(digits, 0, count); in getDouble()
178 if (count == 0) { in getLong()
[all …]
DSimpleDateFormat.java755 int count = 0; in compile() local
768 if (count != 0) { in compile()
769 encode(lastTag, count, compiledPattern); in compile()
771 count = 0; in compile()
782 if (count != 0) { in compile()
783 encode(lastTag, count, compiledPattern); in compile()
785 count = 0; in compile()
816 if (count != 0) { in compile()
817 encode(lastTag, count, compiledPattern); in compile()
819 count = 0; in compile()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_StringReader.java30 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 …]
DStreams.java39 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()
DSupport_StringWriter.java113 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/
DCountLargeTest.java44 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/
DByteArrayOutputStream.java55 protected int count; field in ByteArrayOutputStream
122 ensureCapacity(count + 1); in write()
123 buf[count] = (byte) b; in write()
124 count += 1; in write()
140 ensureCapacity(count + len); in write()
141 System.arraycopy(b, off, buf, count, len); in write()
142 count += len; in write()
154 out.write(buf, 0, count); in writeTo()
166 count = 0; in reset()
178 return Arrays.copyOf(buf, count); in toByteArray()
[all …]
DCharArrayWriter.java52 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()
103 int newcount = count + len; in write()
107 System.arraycopy(c, off, buf, count, len); in write()
108 count = newcount; in write()
120 int newcount = count + len; in write()
124 str.getChars(off, off + len, buf, count); in write()
125 count = newcount; in write()
[all …]
DBufferedOutputStream.java50 protected int count; field in BufferedOutputStream
81 if (count > 0) { in flushBuffer()
82 out.write(buf, 0, count); in flushBuffer()
83 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()
DDataInputStream.java198 int count = in.read(b, off + n, len - n); in readFully() local
199 if (count < 0) in readFully()
201 n += count; in readFully()
603 int count = 0; in readUTF() local
608 while (count < utflen) { in readUTF()
609 c = (int) bytearr[count] & 0xff; in readUTF()
611 count++; in readUTF()
615 while (count < utflen) { in readUTF()
616 c = (int) bytearr[count] & 0xff; in readUTF()
620 count++; in readUTF()
[all …]
DStringBufferInputStream.java65 protected int count; field in StringBufferInputStream
74 count = s.length(); in StringBufferInputStream()
92 return (pos < count) ? (buffer.charAt(pos++) & 0xFF) : -1; in read()
118 if (pos >= count) { in read()
121 if (pos + len > count) { in read()
122 len = count - pos; in read()
147 if (n > count - pos) { in skip()
148 n = count - pos; in skip()
162 return count - pos; in available()
DCharArrayReader.java49 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()
130 if (pos >= count) { in read()
133 if (pos + len > count) { in read()
134 len = count - pos; in read()
160 if (pos + n > count) { in skip()
161 n = count - pos; in skip()
180 return (count - pos) > 0; in ready()
DByteArrayInputStream.java89 protected int count; field in ByteArrayInputStream
106 this.count = buf.length; in ByteArrayInputStream()
126 this.count = Math.min(offset + length, buf.length); in ByteArrayInputStream()
144 return (pos < count) ? (buf[pos++] & 0xff) : -1; in read()
183 if (pos >= count) { in read()
187 int avail = count - pos; in read()
212 long k = count - pos; in skip()
232 return count - pos;
/libcore/dex/src/main/java/com/android/dex/
DLeb128.java41 int count = 0; in unsignedLeb128Size() local
45 count++; in unsignedLeb128Size()
48 return count + 1; in unsignedLeb128Size()
62 int count = 0; in signedLeb128Size() local
72 count++; in signedLeb128Size()
75 return count; in signedLeb128Size()
84 int count = 0; in readSignedLeb128() local
89 result |= (cur & 0x7f) << (count * 7); in readSignedLeb128()
91 count++; in readSignedLeb128()
92 } while (((cur & 0x80) == 0x80) && count < 5); in readSignedLeb128()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DJarInputStreamTest.java163 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/
DStreams.java306 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/dalvik/src/main/java/dalvik/system/profiler/
DDalvikThreadSampler.java40 int count = VMStack.fillStackTraceElements(thread, mutableStackTraceElements[depth]); in getStackTrace() local
41 if (count == 0) { in getStackTrace()
44 if (count < depth) { in getStackTrace()
46 mutableStackTraceElements[count], 0, in getStackTrace()
47 count); in getStackTrace()
49 return mutableStackTraceElements[count]; in getStackTrace()
DAsciiHprofWriter.java60 int count = sample.count; in write() local
61 total += count; in write()
79 int count = sample.count; in write() local
80 double self = (double)count/(double)total; in write()
85 rank, self*100, accum*100, count, stackTrace.stackTraceId, in write()
96 return s2.count - s1.count;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSourceChannelTest.java69 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/
DMeteredStream.java43 protected long count = 0; field in MeteredStream
73 count += n; in justRead()
78 if (count - markedCount > markLimit) { in justRead()
83 pi.updateProgress(count, expected); in justRead()
92 if (count >= expected) { in justRead()
108 if (count - markedCount > markLimit) { in isMarked()
151 long min = (n > expected - count) ? expected - count: n; in skip()
182 markedCount = count; in mark()
195 count = markedCount; in reset()
/libcore/luni/src/main/java/java/util/concurrent/
DLinkedBlockingQueue.java111 private final AtomicInteger count = new AtomicInteger(); field in LinkedBlockingQueue
261 count.set(n); in LinkedBlockingQueue()
275 return count.get(); in size()
292 return capacity - count.get(); in remainingCapacity()
309 final AtomicInteger count = this.count; in put() local
320 while (count.get() == capacity) { in put()
324 c = count.getAndIncrement(); in put()
350 final AtomicInteger count = this.count; in offer() local
353 while (count.get() == capacity) { in offer()
359 c = count.getAndIncrement(); in offer()
[all …]
/libcore/ojluni/src/main/java/java/util/logging/
DFileHandler.java125 private int count; field in FileHandler
193 count = manager.getIntProperty(cname + ".count", 1); in configure()
194 if (count <= 0) { in configure()
195 count = 1; in configure()
254 this.count = 1; in FileHandler()
286 this.count = 1; in FileHandler()
314 public FileHandler(String pattern, int limit, int count) in FileHandler() argument
316 if (limit < 0 || count < 1 || pattern.length() < 1) { in FileHandler()
323 this.count = count; in FileHandler()
353 public FileHandler(String pattern, int limit, int count, boolean append) in FileHandler() argument
[all …]
/libcore/ojluni/src/main/java/sun/net/www/http/
DChunkedOutputStream.java49 private int count; field in ChunkedOutputStream
162 buf[count++] = FOOTER[0]; in flush()
163 buf[count++] = FOOTER[1]; in flush()
166 out.write(buf, adjustedHeaderStartIndex, count - adjustedHeaderStartIndex); in flush()
227 System.arraycopy(b, inputIndex, buf, count, spaceInCurrentChunk); in write()
230 count += spaceInCurrentChunk; in write()
233 buf[count++] = FOOTER[0]; in write()
234 buf[count++] = FOOTER[1]; in write()
249 System.arraycopy(b, inputIndex, buf, count, bytesToWrite); in write()
250 count += bytesToWrite; in write()
[all …]

1234567891011