Searched refs:len (Results 1 - 25 of 125) sorted by relevance

12345

/libcore/benchmarks/src/benchmarks/
H A DSystemArrayCopyBenchmark.java30 final int len = arrayLength;
31 char[] src = new char[len];
32 char[] dst = new char[len];
34 System.arraycopy(src, 0, dst, 0, len);
39 final int len = arrayLength;
40 byte[] src = new byte[len];
41 byte[] dst = new byte[len];
43 System.arraycopy(src, 0, dst, 0, len);
48 final int len = arrayLength;
49 short[] src = new short[len];
[all...]
H A DArrayIterationBenchmark.java43 int len = localArray.length;
45 for (int i = 0; i < len; i++) {
H A DArrayListIterationBenchmark.java37 int len = list.size();
38 for (int i = 0; i < len; ++i) {
/libcore/luni/src/main/native/
H A Dreadlink.cpp29 ssize_t len = readlink(path, &buf[0], buf.size()); local
30 if (len == -1) {
34 if (static_cast<size_t>(len) < buf.size()) {
36 result.assign(&buf[0], len);
H A DZipUtilities.cpp45 void NativeZipStream::setDictionary(JNIEnv* env, jbyteArray javaDictionary, int off, int len, argument
47 std::unique_ptr<jbyte[]> dictionaryBytes(new jbyte[len]);
52 env->GetByteArrayRegion(javaDictionary, off, len, &dictionaryBytes[0]);
56 err = inflateSetDictionary(&stream, dictionary, len);
58 err = deflateSetDictionary(&stream, dictionary, len);
67 void NativeZipStream::setInput(JNIEnv* env, jbyteArray buf, jint off, jint len) { argument
68 input.reset(new jbyte[len]);
74 inCap = len;
76 env->GetByteArrayRegion(buf, off, len, &input[0]);
79 stream.avail_in = len;
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_ASimpleInputStream.java20 public int len; field in class:Support_ASimpleInputStream
37 len = buf.length;
42 len = input.length;
43 buf = new byte[len];
44 System.arraycopy(input, 0, buf, 0, len);
59 return len - pos;
67 if (pos < len) {
H A DSupport_ASimpleReader.java20 public int len; field in class:Support_ASimpleReader
37 len = buf.length;
52 return len > pos;
60 int available = len - pos;
/libcore/luni/src/main/java/java/io/
H A DByteArrayOutputStream.java186 * @param len
191 * if {@code offset < 0} or {@code len < 0}, or if
192 * {@code offset + len} is greater than the length of
196 public synchronized void write(byte[] buffer, int offset, int len) { argument
197 Arrays.checkOffsetAndCount(buffer.length, offset, len);
198 if (len == 0) {
201 expand(len);
202 System.arraycopy(buffer, offset, buf, this.count, len);
203 this.count += len;
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/interfaces/
H A DDSAKeyPairGeneratorImpl.java61 int len = 512;
62 while (len <= 1024) {
63 if (len == modlen) {
67 len = len + 8;
68 if (len == 1032) {
/libcore/luni/src/main/java/javax/xml/parsers/
H A DFilePathToURI.java42 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 DFilePathToURI.java42 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/java/security/
H A DMessageDigestSpi.java58 * @param len
61 * if {@code offset} or {@code len} are not valid in respect to
64 protected abstract void engineUpdate(byte[] input, int offset, int len); argument
110 * @param len
116 * if {@code offset} or {@code len} are not valid in respect to
120 protected int engineDigest(byte[] buf, int offset, int len) throws DigestException { argument
121 if (len < engineGetDigestLength()) {
123 throw new DigestException("The value of len parameter is less than the actual digest length");
129 if (offset + len > buf.length) {
131 throw new DigestException("offset + len > bu
[all...]
H A DDigestOutputStream.java91 * Writes {@code len} bytes into the stream, starting from the specified
98 * @param len
104 public void write(byte[] b, int off, int len) throws IOException { argument
107 digest.update(b, off, len);
109 // write len bytes
110 out.write(b, off, len);
/libcore/luni/src/main/java/javax/crypto/spec/
H A DSecretKeySpec.java76 * length <code>len</code> and the specified <code>algorithm</code> name.
82 * @param len
88 * is empty or <code>offset</code> and <code>len</code> do not
91 * if <code>offset</code> or <code>len</code> is negative.
93 public SecretKeySpec(byte[] key, int offset, int len, String algorithm) { argument
100 if (len < 0 || offset < 0) {
101 throw new ArrayIndexOutOfBoundsException("len < 0 || offset < 0");
103 if (key.length - offset < len) {
110 this.key = new byte[len];
111 System.arraycopy(key, offset, this.key, 0, len);
[all...]
/libcore/luni/src/main/java/libcore/util/
H A DHexEncoding.java39 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/luni/src/test/java/org/apache/harmony/crypto/tests/support/
H A DMyMacSpi.java61 protected void engineUpdate(byte[] input, int offset, int len) { argument
62 if (offset >= 0 && len >= 0) {
63 length = len;
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
H A DASN1Type.java149 int len = 1; //FIXME tag length = 1. what about long form?
150 //for (; tag > 0; tag = tag >> 8, len++);
153 len++;
156 len++;
157 for (int cur = out.length >> 8; cur > 0; len++) {
161 len += out.length;
163 return len;
/libcore/luni/src/main/java/java/sql/
H A DBlob.java161 * @param len
168 public int setBytes(long pos, byte[] theBytes, int offset, int len) argument
175 * @param len
181 public void truncate(long len) throws SQLException; argument
/libcore/luni/src/test/java/libcore/java/nio/charset/
H A DOldCharset_SingleByteAbstractTest.java114 // int len = expected.length;
115 // if (actual.length < len) len = actual.length;
116 // for (int i = 0; i < len; i++) {
132 int len = expected.length;
133 if (actual.length < len) len = actual.length;
134 for (int i = 0; i < len; i++) {
167 // int len = expected.length;
168 // if (actual.length < len) le
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DOldAndroidGZIPStreamTest.java99 int len, totalLen = 0;
101 while ((len = in.read(buf)) > 0) {
102 contents.write(buf, 0, len);
103 totalLen += len;
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DMySignature1.java80 protected void engineUpdate(byte[] b, int off, int len) argument
83 if (off < 0 || off > b.length || off > len) {
86 if (len < 0 || len > b.length) {
87 throw new IllegalArgumentException("incorrect parameter len");
/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/
H A DChunkHandler.java92 public static String getString(ByteBuffer buf, int len) { argument
93 char[] data = new char[len];
94 for (int i = 0; i < len; i++)
103 int len = str.length();
104 for (int i = 0; i < len; i++)
/libcore/luni/src/main/java/java/util/concurrent/
H A DCopyOnWriteArraySet.java338 int len = elements.length;
340 boolean[] matched = new boolean[len];
343 if (++k > len)
346 for (int i = 0; i < len; ++i) {
354 return k == len;
/libcore/luni/src/main/java/java/util/zip/
H A DInflaterInputStream.java52 protected int len; field in class:InflaterInputStream
167 } else if (len == -1) {
174 if (len == -1) {
192 len = is.fill(inf, nativeEndBufSize);
194 if ((len = in.read(buf)) > 0) {
195 inf.setInput(buf, 0, len);
/libcore/luni/src/main/java/javax/crypto/
H A DCipherInputStream.java137 * Reads the next {@code len} bytes from this input stream into buffer
140 * if {@code buf} is {@code null}, the next {@code len} bytes are read and
151 public int read(byte[] buf, int off, int len) throws IOException { argument
159 if (available < len) {
160 len = available;
163 System.arraycopy(outputBuffer, outputIndex, buf, off, len);
165 outputIndex += len;
166 return len;

Completed in 968 milliseconds

12345