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

123456

/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 Dzip.h52 void setDictionary(JNIEnv* env, jbyteArray javaDictionary, int off, int len, bool inflate) { argument
53 UniquePtr<jbyte[]> dictionaryBytes(new jbyte[len]);
58 env->GetByteArrayRegion(javaDictionary, off, len, &dictionaryBytes[0]);
62 err = inflateSetDictionary(&stream, dictionary, len);
64 err = deflateSetDictionary(&stream, dictionary, len);
73 void setInput(JNIEnv* env, jbyteArray buf, jint off, jint len) { argument
74 input.reset(new jbyte[len]);
80 inCap = len;
82 env->GetByteArrayRegion(buf, off, len, &input[0]);
85 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/org/apache/harmony/xnet/provider/jsse/
H A DSSLEngineDataStream.java69 int len = (length < available) ? length : available;
70 available -= len;
71 consumed += len;
72 byte[] res = new byte[len];
78 len --;
79 if (len == 0) {
H A DSSLEngineAppData.java61 int len = buffer.length;
67 if (len - pos < rem) {
69 dsts[i].put(buffer, pos, len - pos);
70 pos = len;
78 if (pos != len) {
90 return len;
H A DSSLSocketOutputStream.java42 public void write(byte[] b, int off, int len) throws IOException { argument
43 owner.writeAppData(b, off, len);
/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;
H A DStringReader.java134 * Reads at most {@code len} characters from the source string and stores
144 * @param len
149 * if {@code offset < 0} or {@code len < 0}, or if
150 * {@code offset + len} is greater than the size of {@code buf}.
155 public int read(char[] buf, int offset, int len) throws IOException { argument
158 Arrays.checkOffsetAndCount(buf.length, offset, len);
159 if (len == 0) {
165 int end = pos + len > this.count ? this.count : pos + 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/org/apache/harmony/security/provider/crypto/
H A DSHA1_MessageDigestImpl.java182 * len number of bytes within buffer allotted for the message digest;
184 * len should be >= 20, DigestException is thrown otherwise
191 * if offset + len > buf.length <BR>
192 * if offset > buf.length or len > buf.length
195 * if len < 20
200 protected int engineDigest(byte[] buf, int offset, int len) throws DigestException { argument
204 if (offset > buf.length || len > buf.length || (len + offset) > buf.length) {
207 if (len < DIGEST_LENGTH) {
208 throw new DigestException("len < DIGEST_LENGT
290 engineUpdate(byte[] input, int offset, int len) argument
[all...]
/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/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/main/java/java/util/zip/
H A DInflaterInputStream.java52 protected int len; field in class:InflaterInputStream
168 } else if (len == -1) {
175 if (len == -1) {
194 long len = is.mLength - is.mOffset;
195 if (len > nativeEndBufSize) len = nativeEndBufSize;
200 if ((len = in.read(buf)) > 0) {
201 inf.setInput(buf, 0, len);
/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.java337 int len = elements.length;
339 boolean[] matched = new boolean[len];
342 if (++k > len)
345 for (int i = 0; i < len; ++i) {
353 return k == len;

Completed in 796 milliseconds

123456