/libcore/libart/src/main/java/java/lang/ |
D | AbstractStringBuilder.java | 40 private int count; field in AbstractStringBuilder 72 count = len; in set() 87 count = string.length(); in AbstractStringBuilder() 89 value = new char[count + INITIAL_CAPACITY]; in AbstractStringBuilder() 90 string.getCharsNoCheck(0, count, value, 0); in AbstractStringBuilder() 96 System.arraycopy(value, 0, newData, 0, count); in enlargeBuffer() 102 int newCount = count + 4; in appendNull() 106 value[count++] = 'n'; in appendNull() 107 value[count++] = 'u'; in appendNull() 108 value[count++] = 'l'; in appendNull() [all …]
|
D | String.java | 79 private final int count; field in String 269 public String(int[] codePoints, int offset, int count) { in String() argument 301 …private StringIndexOutOfBoundsException failedBoundsCheck(int arrayLength, int offset, int count) { in failedBoundsCheck() argument 302 throw new StringIndexOutOfBoundsException(arrayLength, offset, count); in failedBoundsCheck() 355 int end = count < string.count ? count : string.count; in compareToIgnoreCase() 367 return count - string.count; in compareToIgnoreCase() 415 return regionMatches(count - suffix.count, suffix, 0, suffix.count); 429 int count = this.count; 430 if (s.count != count) { 442 for (int i = 0; i < count; ++i) { [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()
|
/libcore/luni/src/main/java/java/io/ |
D | CharArrayWriter.java | 40 protected int count; field in CharArrayWriter 80 if (count + i <= buf.length) { in expand() 84 int newLen = Math.max(2 * buf.length, count + i); in expand() 86 System.arraycopy(buf, 0, newbuf, 0, count); in expand() 105 count = 0; in reset() 118 return count; in size() 131 char[] result = new char[count]; in toCharArray() 132 System.arraycopy(buf, 0, result, 0, count); in toCharArray() 147 return new String(buf, 0, count); in toString() 170 System.arraycopy(buffer, offset, this.buf, this.count, len); in write() [all …]
|
D | ByteArrayOutputStream.java | 39 protected int count; field in ByteArrayOutputStream 87 if (count + i <= buf.length) { in expand() 91 byte[] newbuf = new byte[(count + i) * 2]; in expand() 92 System.arraycopy(buf, 0, newbuf, 0, count); in expand() 102 count = 0; in reset() 111 return count; in size() 122 byte[] newArray = new byte[count]; in toByteArray() 123 System.arraycopy(buf, 0, newArray, 0, count); in toByteArray() 137 return new String(buf, 0, count); in toString() 175 return new String(buf, 0, count, charsetName); in toString() [all …]
|
D | CharArrayReader.java | 46 protected int count; field in CharArrayReader 58 this.count = buf.length; in CharArrayReader() 92 this.count = offset + length < bufferLength ? length : bufferLength; in CharArrayReader() 179 if (pos == count) { 198 public int read(char[] buffer, int offset, int count) throws IOException { 199 Arrays.checkOffsetAndCount(buffer.length, offset, count); 202 if (pos < this.count) { 203 int bytesRead = pos + count > this.count ? this.count - pos : count; 228 return pos != count; 266 if (charCount < this.count - pos) { [all …]
|
D | BufferedWriter.java | 184 public void write(char[] buffer, int offset, int count) throws IOException { in write() argument 190 Arrays.checkOffsetAndCount(buffer.length, offset, count); in write() 191 if (pos == 0 && count >= this.buf.length) { in write() 192 out.write(buffer, offset, count); in write() 196 if (count < available) { in write() 197 available = count; in write() 206 if (count > available) { in write() 208 available = count - available; in write() 264 public void write(String str, int offset, int count) throws IOException { in write() argument 267 if (count <= 0) { in write() [all …]
|
D | StringReader.java | 35 private int count; field in StringReader 47 this.count = str.length(); in StringReader() 126 if (pos != count) { in read() 145 public int read(char[] buffer, int offset, int count) throws IOException { in read() argument 148 Arrays.checkOffsetAndCount(buffer.length, offset, count); in read() 149 if (count == 0) { in read() 152 if (pos == this.count) { in read() 155 int end = pos + count > this.count ? this.count : pos + count; in read() 226 int maxSkip = count - pos; in skip()
|
D | BufferedOutputStream.java | 47 protected int count; field in BufferedOutputStream 138 if (length > (internalBuffer.length - count)) { in write() 142 System.arraycopy(buffer, offset, internalBuffer, count, length); in write() 143 count += length; in write() 173 if (count == buf.length) { in write() 174 out.write(buf, 0, count); in write() 175 count = 0; in write() 177 buf[count++] = (byte) oneByte; in write() 184 if (count > 0) { in flushInternal() 185 out.write(buf, 0, count); in flushInternal() [all …]
|
D | ByteArrayInputStream.java | 48 protected int count; field in ByteArrayInputStream 60 this.count = buf.length; in ByteArrayInputStream() 79 count = offset + length > buf.length ? buf.length : offset + length; in ByteArrayInputStream() 89 return count - pos; in available() 141 return pos < count ? buf[pos++] & 0xFF : -1; in read() 148 if (this.pos >= this.count) { in read() 155 int copylen = this.count - pos < byteCount ? this.count - pos : byteCount; in read() 187 pos = this.count - pos < byteCount ? this.count : (int) (pos + byteCount);
|
D | StringBufferInputStream.java | 38 protected int count; field in StringBufferInputStream 60 count = str.length(); in StringBufferInputStream() 65 return count - pos; in available() 78 return pos < count ? buffer.charAt(pos++) & 0xFF : -1; in read() 90 int copylen = count - pos < byteCount ? count - pos : byteCount; in read() 121 if (this.count - pos < charCount) { 122 numskipped = this.count - pos; 123 pos = this.count;
|
D | PipedReader.java | 224 … @Override public synchronized int read(char[] buffer, int offset, int count) throws IOException { in read() argument 231 Arrays.checkOffsetAndCount(buffer.length, offset, count); in read() 232 if (count == 0) { in read() 263 copyLength = count > this.buffer.length - out ? this.buffer.length - out : count; in read() 280 if (copyLength == count || in == -1) { in read() 286 copyLength = in - out > count - copyLength ? count - copyLength : in - out; in read() 383 synchronized void receive(char[] chars, int offset, int count) throws IOException { in receive() argument 384 Arrays.checkOffsetAndCount(chars.length, offset, count); in receive() 397 while (count > 0) { in receive() 417 if (count < length) { in receive() [all …]
|
D | BufferedInputStream.java | 54 protected int count; field in BufferedInputStream 121 return count - pos + localIn.available(); in available() 153 count = result; in fillbuf() 174 count = markpos = 0; in fillbuf() 176 count = bytesread <= 0 ? pos : pos + bytesread; in fillbuf() 234 if (pos >= count && fillbuf(localIn, localBuf) == -1) { in read() 246 if (count - pos > 0) { in read() 269 if (pos < count) { in read() 271 int copylength = count - pos >= byteCount ? byteCount : count - pos; in read() 306 read = count - pos >= required ? required : count - pos; in read() [all …]
|
D | BufferedReader.java | 172 int count = in.read(buf, pos, buf.length - pos); in fillBuf() local 173 if (count != -1) { in fillBuf() 174 end += count; in fillBuf() 176 return count; in fillBuf() 299 int count = available >= outstanding ? outstanding : available; in read() local 300 System.arraycopy(buf, pos, buffer, offset, count); in read() 301 pos += count; in read() 302 offset += count; in read() 303 outstanding -= count; in read() 325 int count = in.read(buffer, offset, outstanding); in read() local [all …]
|
/libcore/dex/src/main/java/com/android/dex/ |
D | Leb128.java | 41 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/ |
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/luni/src/main/java/java/nio/charset/ |
D | ModifiedUtf8.java | 36 int count = 0, s = 0, a; in decode() local 37 while (count < utfSize) { in decode() 38 if ((out[s] = (char) in[offset + count++]) < '\u0080') { in decode() 41 if (count >= utfSize) { in decode() 42 throw new UTFDataFormatException("bad second byte at " + count); in decode() 44 int b = in[offset + count++]; in decode() 46 throw new UTFDataFormatException("bad second byte at " + (count - 1)); in decode() 50 if (count + 1 >= utfSize) { in decode() 51 throw new UTFDataFormatException("bad third byte at " + (count + 1)); in decode() 53 int b = in[offset + count++]; in decode() [all …]
|
/libcore/luni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 274 int next, last = -1, count = 0; in validatePattern() local 280 if (count > 0) { in validatePattern() 282 count = 0; in validatePattern() 295 count++; in validatePattern() 297 if (count > 0) { in validatePattern() 301 count = 1; in validatePattern() 304 if (count > 0) { in validatePattern() 306 count = 0; in validatePattern() 311 if (count > 0) { in validatePattern() 526 int next, last = -1, count = 0; in formatImpl() local [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | LinkedBlockingQueue.java | 108 private final AtomicInteger count = new AtomicInteger(); field in LinkedBlockingQueue 258 count.set(n); in LinkedBlockingQueue() 272 return count.get(); in size() 289 return capacity - count.get(); in remainingCapacity() 306 final AtomicInteger count = this.count; in put() local 317 while (count.get() == capacity) { in put() 321 c = count.getAndIncrement(); in put() 347 final AtomicInteger count = this.count; in offer() local 350 while (count.get() == capacity) { in offer() 356 c = count.getAndIncrement(); in offer() [all …]
|
/libcore/dalvik/src/main/java/dalvik/system/profiler/ |
D | DalvikThreadSampler.java | 40 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()
|
D | AsciiHprofWriter.java | 60 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/ |
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/luni/src/main/java/libcore/util/ |
D | CountingOutputStream.java | 31 private long count; field in CountingOutputStream 41 count = 0; in CountingOutputStream() 47 count += length; in write() 53 count++; in write() 57 return count; in getCount()
|
/libcore/luni/src/main/java/java/nio/ |
D | Buffer.java | 164 int checkGetBounds(int bytesPerElement, int length, int offset, int count) { in checkGetBounds() argument 165 int byteCount = bytesPerElement * count; in checkGetBounds() 166 if ((offset | count) < 0 || offset > length || length - offset < count) { in checkGetBounds() 168 ", count=" + count + ", length=" + length); in checkGetBounds() 176 int checkPutBounds(int bytesPerElement, int length, int offset, int count) { in checkPutBounds() argument 177 int byteCount = bytesPerElement * count; in checkPutBounds() 178 if ((offset | count) < 0 || offset > length || length - offset < count) { in checkPutBounds() 180 ", count=" + count + ", length=" + length); in checkPutBounds()
|