/libcore/benchmarks/src/benchmarks/ |
D | SystemArrayCopyBenchmark.java | 29 final int len = arrayLength; in timeSystemCharArrayCopy() local 30 char[] src = new char[len]; in timeSystemCharArrayCopy() 31 char[] dst = new char[len]; in timeSystemCharArrayCopy() 33 System.arraycopy(src, 0, dst, 0, len); in timeSystemCharArrayCopy() 38 final int len = arrayLength; in timeSystemByteArrayCopy() local 39 byte[] src = new byte[len]; in timeSystemByteArrayCopy() 40 byte[] dst = new byte[len]; in timeSystemByteArrayCopy() 42 System.arraycopy(src, 0, dst, 0, len); in timeSystemByteArrayCopy() 47 final int len = arrayLength; in timeSystemShortArrayCopy() local 48 short[] src = new short[len]; in timeSystemShortArrayCopy() [all …]
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputBuffer.java | 49 DerInputBuffer(byte[] buf, int offset, int len) { in DerInputBuffer() argument 50 super(buf, offset, len); in DerInputBuffer() 65 int len = available(); in toByteArray() local 66 if (len <= 0) in toByteArray() 68 byte[] retval = new byte[len]; in toByteArray() 70 System.arraycopy(buf, pos, retval, 0, len); in toByteArray() 127 int len = available(); in hashCode() local 130 for (int i = 0; i < len; i++) in hashCode() 135 void truncate(int len) throws IOException { in truncate() argument 136 if (len > available()) in truncate() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipInputStream.java | 195 public int read(byte[] b, int off, int len) throws IOException { in read() argument 197 if (off < 0 || len < 0 || off > b.length - len) { in read() 199 } else if (len == 0) { in read() 208 len = super.read(b, off, len); in read() 209 if (len == -1) { in read() 214 crc.update(b, off, len); in read() 218 remaining -= len; in read() 220 return len; in read() 227 if (len > remaining) { in read() 228 len = (int)remaining; in read() [all …]
|
D | Inflater.java | 88 private int off, len; field in Inflater 141 public void setInput(byte[] b, int off, int len) { in setInput() argument 145 if (off < 0 || len < 0 || off > b.length - len) { in setInput() 151 this.len = len; in setInput() 177 public void setDictionary(byte[] b, int off, int len) { in setDictionary() argument 181 if (off < 0 || len < 0 || off > b.length - len) { in setDictionary() 186 setDictionary(zsRef.address(), b, off, len); in setDictionary() local 212 return len; in getRemaining() 224 return len <= 0; in needsInput() 266 public int inflate(byte[] b, int off, int len) in inflate() argument [all …]
|
D | CheckedInputStream.java | 81 public int read(byte[] buf, int off, int len) throws IOException { in read() argument 82 len = in.read(buf, off, len); in read() 83 if (len != -1) { in read() 84 cksum.update(buf, off, len); in read() 86 return len; in read() 99 long len = n - total; in skip() local 100 len = read(buf, 0, len < buf.length ? (int)len : buf.length); in skip() 101 if (len == -1) { in skip() 104 total += len; in skip()
|
D | Deflater.java | 87 private int off, len; field in Deflater 217 public void setInput(byte[] b, int off, int len) { in setInput() argument 221 if (off < 0 || len < 0 || off > b.length - len) { in setInput() 227 this.len = len; in setInput() 253 public void setDictionary(byte[] b, int off, int len) { in setDictionary() argument 257 if (off < 0 || len < 0 || off > b.length - len) { in setDictionary() 262 setDictionary(zsRef.address(), b, off, len); in setDictionary() local 340 return len <= 0; in needsInput() 383 public int deflate(byte[] b, int off, int len) { in deflate() argument 384 return deflate(b, off, len, NO_FLUSH); in deflate() [all …]
|
D | InflaterInputStream.java | 57 protected int len; field in InflaterInputStream 160 public int read(byte[] b, int off, int len) throws IOException { in read() argument 164 } else if (off < 0 || len < 0 || len > b.length - off) { in read() 166 } else if (len == 0) { in read() 171 while ((n = inf.inflate(b, off, len)) == 0) { in read() 231 int len = max - total; in skip() local 232 if (len > b.length) { in skip() 233 len = b.length; in skip() 235 len = read(b, 0, len); in skip() 236 if (len == -1) { in skip() [all …]
|
D | DeflaterOutputStream.java | 200 public void write(byte[] b, int off, int len) throws IOException { in write() argument 204 if ((off | len | (off + len) | (b.length - (off + len))) < 0) { in write() 206 } else if (len == 0) { in write() 210 def.setInput(b, off, len); in write() 258 int len = 0; in deflate() local 259 while ((len = def.deflate(buf, 0, buf.length)) > 0) { in deflate() 260 out.write(buf, 0, len); in deflate() 281 int len = 0; in flush() local 282 while ((len = def.deflate(buf, 0, buf.length, Deflater.SYNC_FLUSH)) > 0) in flush() 284 out.write(buf, 0, len); in flush() [all …]
|
D | DeflaterInputStream.java | 152 int len = read(rbuf, 0, 1); in read() local 153 if (len <= 0) in read() 171 public int read(byte[] b, int off, int len) throws IOException { in read() argument 176 } else if (off < 0 || len < 0 || len > b.length - off) { in read() 178 } else if (len == 0) { in read() 184 while (len > 0 && !def.finished()) { in read() 199 n = def.deflate(b, off, len); in read() 202 len -= n; in read() 251 int len = read(rbuf, 0, (total <= rbuf.length ? total : rbuf.length)); in skip() local 253 if (len < 0) { in skip() [all …]
|
D | GZIPOutputStream.java | 142 public synchronized void write(byte[] buf, int off, int len) in write() argument 145 super.write(buf, off, len); in write() 146 crc.update(buf, off, len); in write() 159 int len = def.deflate(buf, 0, buf.length); in finish() local 160 if (def.finished() && len <= buf.length - TRAILER_SIZE) { in finish() 162 writeTrailer(buf, len); in finish() 163 len = len + TRAILER_SIZE; in finish() 164 out.write(buf, 0, len); in finish() 167 if (len > 0) in finish() 168 out.write(buf, 0, len); in finish()
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleUtils.java | 55 int len = s1.length(); in caseIgnoreMatch() local 56 if (len != s2.length()) { in caseIgnoreMatch() 60 for (int i = 0; i < len; i++) { in caseIgnoreMatch() 89 int len = s.length(); in toLowerString() local 91 for (; idx < len; idx++) { in toLowerString() 96 if (idx == len) { in toLowerString() 100 char[] buf = new char[len]; in toLowerString() 101 for (int i = 0; i < len; i++) { in toLowerString() 109 int len = s.length(); in toUpperString() local 111 for (; idx < len; idx++) { in toUpperString() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | PushbackInputStream.java | 165 public int read(byte[] b, int off, int len) throws IOException { in read() argument 169 } else if (off < 0 || len < 0 || len > b.length - off) { in read() 171 } else if (len == 0) { in read() 177 if (len < avail) { in read() 178 avail = len; in read() 183 len -= avail; in read() 185 if (len > 0) { in read() 186 len = super.read(b, off, len); in read() 187 if (len == -1) { in read() 190 return avail + len; in read() [all …]
|
D | PushbackReader.java | 106 public int read(char cbuf[], int off, int len) throws IOException { in read() argument 110 if (len <= 0) { in read() 111 if (len < 0) { in read() 120 if (len < avail) in read() 121 avail = len; in read() 125 len -= avail; in read() 127 if (len > 0) { in read() 128 len = super.read(cbuf, off, len); in read() 129 if (len == -1) { in read() 132 return avail + len; in read() [all …]
|
D | CharArrayReader.java | 120 public int read(char b[], int off, int len) throws IOException { in read() argument 123 if ((off < 0) || (off > b.length) || (len < 0) || in read() 124 ((off + len) > b.length) || ((off + len) < 0)) { in read() 126 } else if (len == 0) { in read() 135 if (len > avail) { in read() 136 len = avail; in read() 139 if (len <= 0) { in read() 142 System.arraycopy(buf, pos, b, off, len); in read() 143 pos += len; in read() 144 return len; in read()
|
D | StringBufferInputStream.java | 111 public synchronized int read(byte b[], int off, int len) { in read() argument 114 } else if ((off < 0) || (off > b.length) || (len < 0) || in read() 115 ((off + len) > b.length) || ((off + len) < 0)) { in read() 123 if (len > avail) { in read() 124 len = avail; in read() 127 if (len <= 0) { in read() 131 int cnt = len; in read() 136 return len; in read()
|
D | ByteArrayInputStream.java | 176 public synchronized int read(byte b[], int off, int len) { in read() argument 179 } else if (off < 0 || len < 0 || len > b.length - off) { in read() 188 if (len > avail) { in read() 189 len = avail; in read() 191 if (len <= 0) { in read() 194 System.arraycopy(buf, pos, b, off, len); in read() 195 pos += len; in read() 196 return len; in read()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | DatagramDispatcher.java | 45 int read(FileDescriptor fd, long address, int len) throws IOException { in read() argument 48 return read0(fd, address, len); in read() 51 long readv(FileDescriptor fd, long address, int len) throws IOException { in readv() argument 54 return readv0(fd, address, len); in readv() 57 int write(FileDescriptor fd, long address, int len) throws IOException { in write() argument 60 return write0(fd, address, len); in write() 63 long writev(FileDescriptor fd, long address, int len) throws IOException { in writev() argument 66 return writev0(fd, address, len); in writev() 77 static native int read0(FileDescriptor fd, long address, int len) in read0() argument 80 static native long readv0(FileDescriptor fd, long address, int len) in readv0() argument [all …]
|
D | FileDispatcherImpl.java | 50 int read(FileDescriptor fd, long address, int len) throws IOException { in read() argument 53 return read0(fd, address, len); in read() 56 int pread(FileDescriptor fd, long address, int len, long position) in pread() argument 61 return pread0(fd, address, len, position); in pread() 64 long readv(FileDescriptor fd, long address, int len) throws IOException { in readv() argument 67 return readv0(fd, address, len); in readv() 70 int write(FileDescriptor fd, long address, int len) throws IOException { in write() argument 73 return write0(fd, address, len); in write() 76 int pwrite(FileDescriptor fd, long address, int len, long position) in pwrite() argument 81 return pwrite0(fd, address, len, position); in pwrite() [all …]
|
D | SocketDispatcher.java | 40 int read(FileDescriptor fd, long address, int len) throws IOException { in read() argument 43 return FileDispatcherImpl.read0(fd, address, len); in read() 46 long readv(FileDescriptor fd, long address, int len) throws IOException { in readv() argument 49 return FileDispatcherImpl.readv0(fd, address, len); in readv() 52 int write(FileDescriptor fd, long address, int len) throws IOException { in write() argument 55 return FileDispatcherImpl.write0(fd, address, len); in write() 58 long writev(FileDescriptor fd, long address, int len) throws IOException { in writev() argument 61 return FileDispatcherImpl.writev0(fd, address, len); in writev()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | AbstractStringBuilder.java | 447 int len = str.length(); in append() local 448 ensureCapacityInternal(count + len); in append() 449 str.getChars(0, len, value, count); in append() 450 count += len; in append() 458 int len = sb.length(); in append() local 459 ensureCapacityInternal(count + len); in append() 460 sb.getChars(0, len, value, count); in append() 461 count += len; in append() 471 int len = asb.length(); in append() local 472 ensureCapacityInternal(count + len); in append() [all …]
|
D | ThreadLocal.java | 342 private void setThreshold(int len) { in setThreshold() argument 343 threshold = len * 2 / 3; in setThreshold() 349 private static int nextIndex(int i, int len) { in nextIndex() argument 350 return ((i + 1 < len) ? i + 1 : 0); in nextIndex() 356 private static int prevIndex(int i, int len) { in prevIndex() argument 357 return ((i - 1 >= 0) ? i - 1 : len - 1); in prevIndex() 381 int len = parentTable.length; in ThreadLocalMap() local 382 setThreshold(len); in ThreadLocalMap() 383 table = new Entry[len]; in ThreadLocalMap() 385 for (int j = 0; j < len; j++) { in ThreadLocalMap() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | CopyOnWriteArrayList.java | 365 int len = elements.length; in toArray() local 366 if (a.length < len) in toArray() 367 return (T[]) Arrays.copyOf(elements, len, a.getClass()); in toArray() 369 System.arraycopy(elements, 0, a, 0, len); in toArray() 370 if (a.length > len) in toArray() 371 a[len] = null; in toArray() 408 int len = elements.length; in set() local 409 Object[] newElements = Arrays.copyOf(elements, len); in set() 429 int len = elements.length; in add() local 430 Object[] newElements = Arrays.copyOf(elements, len + 1); in add() [all …]
|
/libcore/ojluni/src/main/native/ |
D | io_util.c | 68 outOfBounds(JNIEnv *env, jint off, jint len, jbyteArray array) { in outOfBounds() argument 70 (len < 0) || in outOfBounds() 73 ((*env)->GetArrayLength(env, array) - off < len)); in outOfBounds() 78 jint off, jint len, jfieldID fid) in readBytes() argument 90 if (outOfBounds(env, off, len, bytes)) { in readBytes() 95 if (len == 0) { in readBytes() 97 } else if (len > BUF_SIZE) { in readBytes() 98 buf = malloc(len); in readBytes() 112 nread = (jint)IO_Read(fd, buf, len); in readBytes() 154 jint off, jint len, jboolean append, jfieldID fid) in writeBytes() argument [all …]
|
/libcore/ojluni/src/main/java/java/util/jar/ |
D | Manifest.java | 205 int len; in read() local 210 while ((len = fis.readLine(lbuf)) != -1) { in read() 211 if (lbuf[--len] != '\n') { in read() 214 if (len > 0 && lbuf[len-1] == '\r') { in read() 215 --len; in read() 217 if (len == 0 && skipEmptyLines) { in read() 223 name = parseName(lbuf, len); in read() 229 lastline = new byte[len - 6]; in read() 230 System.arraycopy(lbuf, 6, lastline, 0, len - 6); in read() 235 byte[] buf = new byte[lastline.length + len - 1]; in read() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Base64.java | 238 int len = 0; in outLength() local 240 len = 4 * ((srclen + 2) / 3); in outLength() 243 len = 4 * (srclen / 3) + (n == 0 ? 0 : n + 1); in outLength() 246 len += (len - 1) / linemax * newline.length; in outLength() 247 return len; in outLength() 261 int len = outLength(src.length); // dst array size in encode() local 262 byte[] dst = new byte[len]; in encode() 289 int len = outLength(src.length); // dst array size in encode() local 290 if (dst.length < len) in encode() 334 int len = outLength(buffer.remaining()); in encode() local [all …]
|