/libcore/ojluni/src/main/java/java/io/ |
H A D | BufferedWriter.java | 169 * @param len Number of characters to write 173 public void write(char cbuf[], int off, int len) throws IOException { argument 176 if ((off < 0) || (off > cbuf.length) || (len < 0) || 177 ((off + len) > cbuf.length) || ((off + len) < 0)) { 179 } else if (len == 0) { 183 if (len >= nChars) { 188 out.write(cbuf, off, len); 192 int b = off, t = off + len; 207 * <p> If the value of the <tt>len</t 219 write(String s, int off, int len) argument [all...] |
H A D | CharArrayWriter.java | 93 * @param len the number of chars that are written 95 public void write(char c[], int off, int len) { argument 96 if ((off < 0) || (off > c.length) || (len < 0) || 97 ((off + len) > c.length) || ((off + len) < 0)) { 99 } else if (len == 0) { 103 int newcount = count + len; 107 System.arraycopy(c, off, buf, count, len); 116 * @param len Number of characters to be written 118 public void write(String str, int off, int len) { argument [all...] |
H A D | InputStream.java | 105 * Reads up to <code>len</code> bytes of data from the input stream into 107 * <code>len</code> bytes, but a smaller number may be read. 113 * <p> If <code>len</code> is zero, then no bytes are read and 121 * is, at most, equal to <code>len</code>. Let <i>k</i> be the number of 125 * <code>b[off+len-1]</code> unaffected. 128 * <code>b[off]</code> and elements <code>b[off+len]</code> through 131 * <p> The <code>read(b,</code> <code>off,</code> <code>len)</code> method 135 * the <code>read(b,</code> <code>off,</code> <code>len)</code> method. If 141 * until the requested amount of input data <code>len</code> has been read, 148 * @param len th 161 read(byte b[], int off, int len) argument [all...] |
H A D | PipedWriter.java | 128 * Writes <code>len</code> characters from the specified character array 138 * @param len the number of characters to write. 144 public void write(char cbuf[], int off, int len) throws IOException { argument 147 } else if ((off | len | (off + len) | (cbuf.length - (off + len))) < 0) { 150 sink.receive(cbuf, off, len);
|
H A D | SequenceInputStream.java | 174 * Reads up to <code>len</code> bytes of data from this input stream 175 * into an array of bytes. If <code>len</code> is not zero, the method 188 * @param len the maximum number of bytes read. 192 * <code>len</code> is negative, or <code>len</code> is greater than 196 public int read(byte b[], int off, int len) throws IOException { argument 201 } else if (off < 0 || len < 0 || len > b.length - off) { 203 } else if (len == 0) { 207 int n = in.read(b, off, len); [all...] |
H A D | BufferedInputStream.java | 278 private int read1(byte[] b, int off, int len) throws IOException { argument 285 if (len >= getBufIfOpen().length && markpos < 0) { 286 return getInIfOpen().read(b, off, len); 292 int cnt = (avail < len) ? avail : len; 328 * @param len maximum number of bytes to read. 335 public synchronized int read(byte b[], int off, int len) argument 339 if ((off | len | (off + len) | (b.length - (off + len))) < [all...] |
H A D | ByteArrayOutputStream.java | 141 * Writes <code>len</code> bytes from the specified byte array 146 * @param len the number of bytes to write. 148 public synchronized void write(byte b[], int off, int len) { argument 149 if ((off < 0) || (off > b.length) || (len < 0) || 150 ((off + len) - b.length > 0)) { 153 ensureCapacity(count + len); 154 System.arraycopy(b, off, buf, count, len); 155 count += len;
|
/libcore/ojluni/src/main/java/java/lang/ |
H A D | StringCoding.java | 76 private static byte[] safeTrim(byte[] ba, int len, Charset cs, boolean isTrusted) { argument 80 // if (len == ba.length && (isTrusted || System.getSecurityManager() == null)) 81 if (len == ba.length && (isTrusted)) 84 return Arrays.copyOf(ba, len); 89 private static char[] safeTrim(char[] ca, int len, argument 93 // if (len == ca.length && (isTrusted || System.getSecurityManager() == null)) 94 if (len == ca.length && (isTrusted)) 97 return Arrays.copyOf(ca, len); 100 private static int scale(int len, float expansionFactor) { argument 102 // we lose low order bits when len i 155 decode(byte[] ba, int off, int len) argument 184 decode(String charsetName, byte[] ba, int off, int len) argument 204 decode(Charset cs, byte[] ba, int off, int len) argument 258 decode(byte[] ba, int off, int len) argument 306 encode(char[] ca, int off, int len) argument 336 encode(String charsetName, char[] ca, int off, int len) argument 356 encode(Charset cs, char[] ca, int off, int len) argument 393 encode(char[] ca, int off, int len) argument [all...] |
H A D | ThreadLocal.java | 342 private void setThreshold(int len) { argument 343 threshold = len * 2 / 3; 347 * Increment i modulo len. 349 private static int nextIndex(int i, int len) { argument 350 return ((i + 1 < len) ? i + 1 : 0); 354 * Decrement i modulo len. 356 private static int prevIndex(int i, int len) { argument 357 return ((i - 1 >= 0) ? i - 1 : len - 1); 381 int len = parentTable.length; 382 setThreshold(len); [all...] |
H A D | AbstractStringBuilder.java | 450 int len = str.length(); 451 ensureCapacityInternal(count + len); 452 str.getChars(0, len, value, count); 453 count += len; 462 int len = sb.length(); 463 ensureCapacityInternal(count + len); 464 sb.getChars(0, len, value, count); 465 count += len; 476 int len = asb.length(); 477 ensureCapacityInternal(count + len); 603 append(char str[], int offset, int len) argument 980 insert(int index, char[] str, int offset, int len) argument [all...] |
/libcore/ojluni/src/main/native/ |
H A D | SocketInputStream.c | 56 jint off, jint len, jint timeout) 82 if (len > MAX_BUFFER_LEN) { 83 if (len > MAX_HEAP_BUFFER_LEN) { 84 len = MAX_HEAP_BUFFER_LEN; 86 bufP = (char *)malloc((size_t)len); 89 len = MAX_BUFFER_LEN; 119 nread = NET_Read(fd, bufP, len); 54 SocketInputStream_socketRead0(JNIEnv *env, jobject this, jobject fdObj, jbyteArray data, jint off, jint len, jint timeout) argument
|
H A D | UnixCopyFile.c | 60 ssize_t n, pos, len; local 72 len = n; 76 RESTARTABLE(write((int)dst, bufp, len), n); 82 len -= n; 83 } while (len > 0);
|
H A D | DatagramDispatcher.c | 52 jobject fdo, jlong address, jint len) 56 int result = recv(fd, buf, len, 0); 69 jobject fdo, jlong address, jint len) 80 if (len > iov_max) { 81 len = iov_max; 87 m.msg_iovlen = len; 99 jobject fdo, jlong address, jint len) 103 int result = send(fd, buf, len, 0); 113 jobject fdo, jlong address, jint len) 125 if (len > iov_ma 51 Java_sun_nio_ch_DatagramDispatcher_read0(JNIEnv *env, jclass clazz, jobject fdo, jlong address, jint len) argument 68 Java_sun_nio_ch_DatagramDispatcher_readv0(JNIEnv *env, jclass clazz, jobject fdo, jlong address, jint len) argument 98 Java_sun_nio_ch_DatagramDispatcher_write0(JNIEnv *env, jclass clazz, jobject fdo, jlong address, jint len) argument 112 Java_sun_nio_ch_DatagramDispatcher_writev0(JNIEnv *env, jclass clazz, jobject fdo, jlong address, jint len) argument [all...] |
H A D | jni_util_md.c | 52 getErrorString(int err, char *buf, size_t len) argument 54 if (err == 0 || len < 1) return 0; 55 return strerror_r(err, buf, len);
|
H A D | MappedByteBuffer.c | 41 jlong len, jint numPages) 58 result = mincore(a, (size_t)len, vec); 78 jlong len) 81 int result = madvise((caddr_t)a, (size_t)len, MADV_WILLNEED); 90 jlong address, jlong len) 93 int result = msync(a, (size_t)len, MS_SYNC); 40 Java_java_nio_MappedByteBuffer_isLoaded0(JNIEnv *env, jobject obj, jlong address, jlong len, jint numPages) argument 77 Java_java_nio_MappedByteBuffer_load0(JNIEnv *env, jobject obj, jlong address, jlong len) argument 89 Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jobject fdo, jlong address, jlong len) argument
|
H A D | SocketOutputStream.c | 58 jint off, jint len) { 79 if (len <= MAX_BUFFER_LEN) { 83 buflen = min(MAX_HEAP_BUFFER_LEN, len); 93 while(len > 0) { 95 int chunkLen = min(buflen, len); 122 len -= chunkLen; 55 SocketOutputStream_socketWrite0(JNIEnv *env, jobject this, jobject fdObj, jbyteArray data, jint off, jint len) argument
|
H A D | java_util_zip_CRC32.c | 50 jarray b, jint off, jint len) 54 crc = crc32(crc, buf + off, len); 61 ZIP_CRC32(jint crc, const jbyte *buf, jint len) argument 63 return crc32(crc, (Bytef*)buf, len); 68 jlong address, jint off, jint len) 72 crc = crc32(crc, buf + off, len); 49 CRC32_updateBytes(JNIEnv *env, jclass cls, jint crc, jarray b, jint off, jint len) argument 67 CRC32_updateByteBuffer(JNIEnv *env, jclass cls, jint crc, jlong address, jint off, jint len) argument
|
/libcore/luni/src/main/java/javax/xml/parsers/ |
H A D | FilePathToURI.java | 42 int len = escChs.length; 44 for (int i = 0; i < len; i++) { 63 int len = path.length(), ch; 64 StringBuilder buffer = new StringBuilder(len*3); 67 if (len >= 2 && path.charAt(1) == ':') { 76 for (; i < len; i++) { 93 if (i < len) { 103 len = bytes.length; 106 for (i = 0; i < len; i++) {
|
/libcore/luni/src/main/java/javax/xml/transform/stream/ |
H A D | FilePathToURI.java | 42 int len = escChs.length; 44 for (int i = 0; i < len; i++) { 63 int len = path.length(), ch; 64 StringBuilder buffer = new StringBuilder(len*3); 67 if (len >= 2 && path.charAt(1) == ':') { 76 for (; i < len; i++) { 93 if (i < len) { 103 len = bytes.length; 106 for (i = 0; i < len; i++) {
|
/libcore/luni/src/main/java/libcore/util/ |
H A D | HexEncoding.java | 39 public static char[] encode(byte[] data, int offset, int len) { argument 40 char[] result = new char[len * 2]; 41 for (int i = 0; i < len; i++) { 76 for (int len = encoded.length; i < len; i += 2) {
|
/libcore/ojluni/src/main/java/java/security/ |
H A D | DigestOutputStream.java | 137 * @param len the number of bytes of data to be updated and written 144 public void write(byte[] b, int off, int len) throws IOException { argument 147 if (b == null || off + len > b.length) { 150 if (off < 0 || len < 0) { 154 out.write(b, off, len); 156 digest.update(b, off, len);
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/support/ |
H A D | MyMacSpi.java | 61 protected void engineUpdate(byte[] input, int offset, int len) { argument 62 if (offset >= 0 && len >= 0) { 63 length = len;
|
/libcore/ojluni/src/main/java/java/nio/channels/ |
H A D | Channels.java | 159 public synchronized void write(byte[] bs, int off, int len) 162 if ((off < 0) || (off > bs.length) || (len < 0) || 163 ((off + len) > bs.length) || ((off + len) < 0)) { 165 } else if (len == 0) { 171 bb.limit(Math.min(off + len, bb.capacity())); 219 public synchronized int read(byte[] bs, int off, int len) 222 if ((off < 0) || (off > bs.length) || (len < 0) || 223 ((off + len) > bs.length) || ((off + len) < [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | ChannelInputStream.java | 94 public synchronized int read(byte[] bs, int off, int len) argument 97 if ((off < 0) || (off > bs.length) || (len < 0) || 98 ((off + len) > bs.length) || ((off + len) < 0)) { 100 } else if (len == 0) 106 bb.limit(Math.min(off + len, bb.capacity()));
|
/libcore/benchmarks/src/benchmarks/ |
H A D | ArrayListIterationBenchmark.java | 33 int len = list.size(); 34 for (int i = 0; i < len; ++i) {
|