Searched refs:count (Results 26 - 50 of 257) sorted by relevance

1234567891011

/libcore/support/src/test/java/tests/support/
H A DSupport_ASimpleWriter.java55 public void write(char[] src, int offset, int count) throws IOException { argument
59 if (offset < 0 || count < 0 || (offset + count) > buf.length) {
63 System.arraycopy(src, offset, buf, pos, count);
64 pos += count;
H A DSupport_ASimpleReader.java56 public int read(char[] dest, int offset, int count) throws IOException { argument
62 int readable = (available < count ? available : count);
H A DSupport_OutputStream.java68 public void write(byte buffer[], int offset, int count) throws IOException { argument
72 if (offset < 0 || count < 0 || (offset + count) > buffer.length) {
75 for (int i = offset; i < offset + count; i++) {
/libcore/ojluni/src/main/java/java/util/stream/
H A DStreams.java160 * to a count lower than this threshold.
284 * to a count lower than this threshold.
306 int count; field in class:Streams.AbstractStreamBuilderImpl
309 // count == -1 for no elements
310 // count == -2 for one element held by first
319 return -count - 1;
333 // valid if count == 1
337 // non-null if count == 2
352 count = -2;
359 if (count
[all...]
/libcore/benchmarks/src/benchmarks/
H A DReferenceBenchmark.java93 AtomicInteger count; field in class:ReferenceBenchmark.FinalizableObject
95 public FinalizableObject(AtomicInteger count) { argument
96 this.count = count;
101 count.incrementAndGet();
109 AtomicInteger count = new AtomicInteger(0);
111 new FinalizableObject(count);
121 int got = count.get();
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DWriterTest.java121 public void write(char[] buffer, int offset, int count) argument
126 if (offset < 0 || count < 0 || offset >= buffer.length) {
129 count = Math.min(count, buffer.length - offset);
130 count = Math.min(count, this.length - this.offset);
131 for (int i = 0; i < count; i++) {
134 this.offset += count;
/libcore/luni/src/test/java/libcore/java/io/
H A DInputStreamReaderTest.java38 int count = reader.read(buffer);
39 assertEquals(5, count);
/libcore/luni/src/main/native/
H A DIcuUtilities.cpp37 int32_t count = se->count(status); local
38 if (maybeThrowIcuException(env, "StringEnumeration::count", status)) {
42 jobjectArray result = env->NewObjectArray(count, JniConstants::stringClass, NULL);
43 for (int32_t i = 0; i < count; ++i) {
/libcore/ojluni/src/main/java/java/nio/file/
H A DWatchEvent.java33 * #count() count} to indicate the number of times that the event has been
98 * Returns the event count. If the event count is greater than {@code 1}
101 * @return the event count
103 int count(); method in interface:WatchEvent
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DSourceChannelTest.java69 int count = source.read(ByteBuffer.allocate(10));
70 assertEquals(1, count);
93 long count = source.read(readBuf);
94 assertEquals(BUFFER_SIZE, count);
96 count = source.read(readBuf);
97 assertEquals(0, count);
100 count = source.read(readBuf);
101 assertEquals(-1, count);
176 long count = source.read(readBufArray);
177 if (count <
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DDeflaterInputStreamTest.java61 int count;
62 while ((count = in.read(buffer)) != -1) {
63 out.write(buffer, 0, count);
75 int count;
76 while ((count = in.read(buffer, 0, 5)) != -1) {
77 assertTrue(count <= 5);
78 out.write(buffer, 0, count);
/libcore/ojluni/src/main/java/java/util/logging/
H A DMemoryHandler.java96 int start, count; field in class:MemoryHandler
150 // Initialize. Size is a count of LogRecords.
154 count = 0;
206 int ix = (start+count)%buffer.length;
208 if (count < buffer.length) {
209 count++;
225 for (int i = 0; i < count; i++) {
232 count = 0;
H A DFileHandler.java90 * <li> &lt;handler-name&gt;.count
122 * If no "%g" field has been specified and the file count is greater
126 * Thus for example a pattern of "%t/java%g.log" with a count of 2
155 private int count; field in class:FileHandler
231 count = manager.getIntProperty(cname + ".count", 1);
232 if (count <= 0) {
233 count = 1;
273 * set to no limit, and the file count is set to one.
292 this.count
353 FileHandler(String pattern, int limit, int count) argument
392 FileHandler(String pattern, int limit, int count, boolean append) argument
[all...]
/libcore/ojluni/src/main/java/java/io/
H A DBufferedInputStream.java88 * elements <code>buf[0]</code> through <code>buf[count-1]
92 protected int count; field in class:BufferedInputStream
99 * through <code>count</code>. If it is less
100 * than <code>count</code>, then <code>buf[pos]</code>
102 * if it is equal to <code>count</code>, then
129 * of <code>count</code>, <code>pos</code>,
213 * hence pos > count.
247 count = pos;
250 count = n + pos;
266 if (pos >= count) {
[all...]
H A DDataOutputStream.java349 int c, count = 0;
377 bytearr[count++] = (byte) ((utflen >>> 8) & 0xFF);
378 bytearr[count++] = (byte) ((utflen >>> 0) & 0xFF);
384 bytearr[count++] = (byte) c;
390 bytearr[count++] = (byte) c;
393 bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
394 bytearr[count++] = (byte) (0x80 | ((c >> 6) & 0x3F));
395 bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
397 bytearr[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F));
398 bytearr[count
[all...]
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DLinkedBlockingQueue.java87 * waiting puts. Similarly for the takeLock. The "count" field
100 * count updated. A subsequent reader guarantees visibility to the
102 * or by acquiring the takeLock, and then reading n = count.get();
140 private final AtomicInteger count = new AtomicInteger(); field in class:LinkedBlockingQueue
290 count.set(n);
304 return count.get();
321 return capacity - count.get();
334 // holding count negative to indicate failure unless set.
338 final AtomicInteger count = this.count;
[all...]
H A DCyclicBarrier.java147 * can be active at a time (the one to which {@code count} applies)
172 private int count; field in class:CyclicBarrier
182 count = parties;
192 count = parties;
215 int index = --count;
281 this.count = parties;
487 return parties - count;
H A DArrayBlockingQueue.java106 int count; field in class:ArrayBlockingQueue
156 count++;
172 count--;
193 count--;
210 count--;
277 count = i;
313 if (count == items.length)
336 while (count == items.length)
360 while (count == items.length) {
376 return (count
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DIoUtils.java197 private int count; field in class:IoUtils.FileReader
234 while ((read = Libcore.os.read(fd, bytes, count, capacity - count)) != 0) {
235 count += read;
236 if (count == capacity) {
263 if (count == bytes.length) {
266 byte[] result = new byte[count];
267 System.arraycopy(bytes, 0, result, 0, count);
272 return new String(bytes, 0, count, cs);
/libcore/benchmarks/src/benchmarks/regression/
H A DIntegerBenchmark.java57 int count = popX(l & 0xffffffffL);
58 count += popX(l >>> 32);
59 return count;
83 int count = Integer.bitCount((int) (l & 0xffffffffL));
84 count += Integer.bitCount((int) (l >>> 32));
85 return count;
/libcore/ojluni/src/main/java/sun/nio/ch/
H A DPort.java151 int count;
155 count = 0;
158 channels[count++] = fdToChannel.get(fd);
159 if (count >= MAX_BATCH_SIZE)
167 for (int i=0; i<count; i++) {
172 } while (count > 0);
H A DEPoll.java66 * Allocates a poll array to handle up to {@code count} events.
68 static long allocatePollArray(int count) { argument
69 return unsafe.allocateMemory(count * SIZEOF_EPOLLEVENT);
/libcore/ojluni/src/main/java/java/util/jar/
H A DManifest.java323 private int count = 0; field in class:Manifest.FastInputStream
336 if (pos >= count) {
338 if (pos >= count) {
346 int avail = count - pos;
352 avail = count - pos;
373 int avail = count - pos;
376 avail = count - pos;
401 if (pos == count)
403 if (pos == count)
416 long avail = count
[all...]
/libcore/luni/src/test/java/libcore/java/sql/
H A DOldSQLTest.java93 int count = 0;
96 count++;
101 return count;
/libcore/ojluni/src/main/java/java/net/
H A DInterfaceAddress.java63 short count = 0;
65 for (; b != 0; b <<= 1, ++count);
67 return count;

Completed in 2486 milliseconds

1234567891011