Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 482) sorted by relevance

12345678910>>...20

/packages/apps/Email/src/com/android/email/codec/binary/
DBase64.java224 this.lineSeparator = new byte[lineSeparator.length]; in Base64()
225 System.arraycopy(lineSeparator, 0, this.lineSeparator, 0, lineSeparator.length); in Base64()
227 this.encodeSize = 4 + lineSeparator.length; in Base64()
264 byte[] b = new byte[buf.length * 2]; in resizeBuf()
265 System.arraycopy(buf, 0, b, 0, buf.length); in resizeBuf()
314 if (out != null && out.length == outAvail) { in setInitialBuffer()
346 if (buf == null || buf.length - pos < encodeSize) { in encode()
365 System.arraycopy(lineSeparator, 0, buf, pos, lineSeparator.length); in encode()
366 pos += lineSeparator.length; in encode()
370 if (buf == null || buf.length - pos < encodeSize) { in encode()
[all …]
/packages/apps/Email/src/com/android/email/mail/
DAddress.java104 if (personal.length() == 0) { in setPersonal()
118 if (addressList != null && addressList.length() > 0) { in isAllValid()
120 for (int i = 0, length = tokens.length; i < length; ++i) { in isAllValid()
139 if (addressList == null || addressList.length() == 0) { in parse()
144 for (int i = 0, length = tokens.length; i < length; ++i) { in parse()
168 int len = address.length(); in isValidAddress()
218 if (addresses == null || addresses.length == 0) { in toString()
221 if (addresses.length == 1) { in toString()
225 for (int i = 1; i < addresses.length; i++) { in toString()
254 if (addresses == null || addresses.length == 0) { in toHeader()
[all …]
/packages/apps/Email/src/org/apache/commons/io/input/
DCharSequenceReader.java79 if (idx >= charSequence.length()) { in read()
95 public int read(char[] array, int offset, int length) { in read() argument
96 if (idx >= charSequence.length()) { in read()
102 if (length < 0 || (offset + length) > array.length) { in read()
103 throw new IndexOutOfBoundsException("Array Size=" + array.length + in read()
104 ", offset=" + offset + ", length=" + length); in read()
107 for (int i = 0; i < length; i++) { in read()
137 if (idx >= charSequence.length()) { in skip()
140 int dest = (int)Math.min(charSequence.length(), (idx + n)); in skip()
/packages/inputmethods/LatinIME/src/com/android/inputmethod/latin/
DExpandableDictionary.java43 int length = 0; field in ExpandableDictionary.NodeArray
51 if (length + 1 > data.length) { in add()
52 Node[] tempData = new Node[length + INCREMENT]; in add()
53 if (length > 0) { in add()
54 System.arraycopy(data, 0, tempData, 0, length); in add()
58 data[length++] = n; in add()
87 final int wordLength = word.length(); in addWordRec()
90 final int childrenLength = children.length; in addWordRec()
121 if (mCodes.length < mInputLength) mCodes = new int[mInputLength][]; in getWords()
135 final int freq = getWordFrequencyRec(mRoots, word, 0, word.length()); in isValidWord()
[all …]
/packages/apps/Email/src/org/apache/james/mime4j/codec/
DEncoderUtil.java224 for (int idx = 0; idx < text.length(); idx++) { in hasToBeEncoded()
362 final int end = bytes.length; in encodeB()
407 final int end = bytes.length; in encodeQ()
439 final int length = str.length(); in isToken() local
440 if (length == 0) in isToken()
443 for (int idx = 0; idx < length; idx++) { in isToken()
457 final int length = str.length(); in isAtomPhrase() local
458 for (int idx = 0; idx < length; idx++) { in isAtomPhrase()
478 final int length = str.length(); in isDotAtomText() local
479 if (length == 0) in isDotAtomText()
[all …]
/packages/apps/Email/src/org/apache/commons/io/output/
DByteArrayOutputStream.java110 filledBufferSum += currentBuffer.length; in needNewBuffer()
122 currentBuffer.length << 1, in needNewBuffer()
124 filledBufferSum += currentBuffer.length; in needNewBuffer()
141 || (off > b.length) in write()
143 || ((off + len) > b.length) in write()
154 int part = Math.min(remaining, currentBuffer.length - inBufferPos); in write()
172 if (inBufferPos == currentBuffer.length) { in write()
194 int n = in.read(currentBuffer, inBufferPos, currentBuffer.length - inBufferPos); in write()
199 if (inBufferPos == currentBuffer.length) { in write()
200 needNewBuffer(currentBuffer.length); in write()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DNameNormalizer.java62 return name1.length() - name2.length(); in compareComplexity()
70 int length = 0; in lettersAndDigitsOnly() local
71 for (int i = 0; i < letters.length; i++) { in lettersAndDigitsOnly()
74 letters[length++] = c; in lettersAndDigitsOnly()
78 if (length != letters.length) { in lettersAndDigitsOnly()
79 return new String(letters, 0, length); in lettersAndDigitsOnly()
DContactLookupKey.java65 if (lookupKey.length() != 0) { in appendToLookupKey()
73 int pos = lookupKey.length(); in appendToLookupKey()
87 sb.append(sourceId, start, sourceId.length()); in appendEscapedSourceId()
104 int length = string.length(); in parse() local
110 while (offset < length) { in parse()
115 while (offset < length) { in parse()
140 while (offset < length) { in parse()
144 if (offset == length) { in parse()
162 while (offset < length) { in parse()
169 if (offset == length) { in parse()
DHex.java59 char[] cArray = new char[array.length * 2]; in encodeHex()
62 for (int i = 0; i < array.length; i++) { in encodeHex()
79 int length = hexString.length(); in decodeHex() local
81 if ((length & 0x01) != 0) { in decodeHex()
86 byte[] out = new byte[length >> 1]; in decodeHex()
87 for (int i = 0, j = 0; j < length; i++) { in decodeHex()
/packages/apps/Email/src/org/apache/james/mime4j/decoder/
DUnboundedFifoByteBuffer.java98 size = buffer.length - head + tail; in size()
123 if (size() + 1 >= buffer.length) { in add()
124 byte[] tmp = new byte[((buffer.length - 1) * 2) + 1]; in add()
133 if (i == buffer.length) { in add()
145 if (tail >= buffer.length) { in add()
179 if (head >= buffer.length) { in remove()
194 if (index >= buffer.length) { in increment()
209 index = buffer.length - 1; in decrement()
254 if (i >= buffer.length) { in iterator()
/packages/apps/Email/src/org/apache/james/mime4j/field/datetime/parser/
DParseException.java118 for (int i = 0; i < expectedTokenSequences.length; i++) { in getMessage()
119 if (maxSize < expectedTokenSequences[i].length) { in getMessage()
120 maxSize = expectedTokenSequences[i].length; in getMessage()
122 for (int j = 0; j < expectedTokenSequences[i].length; j++) { in getMessage()
125 if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { in getMessage()
143 if (expectedTokenSequences.length == 1) { in getMessage()
165 for (int i = 0; i < str.length(); i++) { in add_escapes()
197 retval.append("\\u" + s.substring(s.length() - 4, s.length())); in add_escapes()
/packages/apps/Email/src/org/apache/james/mime4j/field/contenttype/parser/
DParseException.java118 for (int i = 0; i < expectedTokenSequences.length; i++) { in getMessage()
119 if (maxSize < expectedTokenSequences[i].length) { in getMessage()
120 maxSize = expectedTokenSequences[i].length; in getMessage()
122 for (int j = 0; j < expectedTokenSequences[i].length; j++) { in getMessage()
125 if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { in getMessage()
143 if (expectedTokenSequences.length == 1) { in getMessage()
165 for (int i = 0; i < str.length(); i++) { in add_escapes()
197 retval.append("\\u" + s.substring(s.length() - 4, s.length())); in add_escapes()
/packages/apps/Email/src/org/apache/james/mime4j/field/address/parser/
DParseException.java118 for (int i = 0; i < expectedTokenSequences.length; i++) { in getMessage()
119 if (maxSize < expectedTokenSequences[i].length) { in getMessage()
120 maxSize = expectedTokenSequences[i].length; in getMessage()
122 for (int j = 0; j < expectedTokenSequences[i].length; j++) { in getMessage()
125 if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { in getMessage()
143 if (expectedTokenSequences.length == 1) { in getMessage()
165 for (int i = 0; i < str.length(); i++) { in add_escapes()
197 retval.append("\\u" + s.substring(s.length() - 4, s.length())); in add_escapes()
/packages/inputmethods/LatinIME/dictionary/src/
Ddictionary.cpp109 Dictionary::addWord(unsigned short *word, int length, int frequency) in addWord() argument
111 word[length] = 0; in addWord()
113 char s[length + 1]; in addWord()
114 for (int i = 0; i <= length; i++) s[i] = word[i]; in addWord()
123 && length < wideStrLen(mOutputChars + insertAt * mMaxWordLength))) { in addWord()
137 while (length--) { in addWord()
163 Dictionary::sameAsTyped(unsigned short *word, int length) in sameAsTyped() argument
165 if (length != mInputLength) { in sameAsTyped()
169 while (length--) { in sameAsTyped()
256 Dictionary::isValidWord(unsigned short *word, int length) in isValidWord() argument
[all …]
/packages/apps/Email/tests/src/com/android/email/mail/
DAddressUnitTests.java83 int len = testString.length(); in testBase64Decode()
176 assertTrue("parsing null address", result != null && result.length == 0); in testEmptyParse()
180 assertTrue("parsing zero-length", result != null && result.length == 0); in testEmptyParse()
184 assertTrue("parsing spaces", result != null && result.length == 0); in testEmptyParse()
188 assertTrue("parsing spaces with comma", result != null && result.length == 0); in testEmptyParse()
196 assertEquals("bare address count", 1, address1.length); in testSingleParse()
201 assertEquals("bracket address count", 1, address2.length); in testSingleParse()
206 assertEquals("address with name count", 1, address3.length); in testSingleParse()
211 assertEquals("address with quoted name count", 1, address4.length); in testSingleParse()
221 assertEquals("no atmark", 0, address1.length); in testIllegalParse()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppSendFileInfo.java68 public BluetoothOppSendFileInfo(String fileName, String type, long length, in BluetoothOppSendFileInfo() argument
72 mLength = length; in BluetoothOppSendFileInfo()
80 public BluetoothOppSendFileInfo(String data, String type, long length, int status, in BluetoothOppSendFileInfo() argument
86 mLength = length; in BluetoothOppSendFileInfo()
100 long length = 0; in generateFileInfo() local
111 length = metadataCursor.getInt(1); in generateFileInfo()
121 length = f.length(); in generateFileInfo()
134 return new BluetoothOppSendFileInfo(fileName, contentType, length, is, 0, dest); in generateFileInfo()
/packages/apps/Email/src/com/android/email/
DPreferences.java64 if (accountUuids == null || accountUuids.length() == 0) { in getAccounts()
68 Account[] accounts = new Account[uuids.length]; in getAccounts()
69 for (int i = 0, length = uuids.length; i < length; i++) { in getAccounts()
88 if (accountUuids == null || accountUuids.length() == 0) { in getAccountByContentUri()
92 for (int i = 0, length = uuids.length; i < length; i++) { in getAccountByContentUri()
119 if (accounts.length > 0) { in getDefaultAccount()
DUtility.java59 for (int i = 0, count = a.length; i < count; i++) { in arrayContains()
81 for (int i = 0; i < parts.length; i++) { in combine()
83 if (i < parts.length - 1) { in combine()
107 return view.getText() != null && view.getText().length() > 0; in requiredFieldValid()
111 return s != null && s.length() > 0; in requiredFieldValid()
182 int length = 0; in fastUrlDecode() local
183 for (int i = 0, count = bytes.length; i < count; i++) { in fastUrlDecode()
194 bytes[length] = (byte) ((h << 4) | l); in fastUrlDecode()
198 bytes[length] = ' '; in fastUrlDecode()
201 bytes[length] = bytes[i]; in fastUrlDecode()
[all …]
DFixedLengthInputStream.java32 public FixedLengthInputStream(InputStream in, int length) { in FixedLengthInputStream() argument
34 this.mLength = length; in FixedLengthInputStream()
53 public int read(byte[] b, int offset, int length) throws IOException { in read() argument
55 int d = mIn.read(b, offset, Math.min(mLength - mCount, length)); in read()
69 return read(b, 0, b.length); in read()
/packages/apps/Mms/src/com/android/mms/dom/smil/
DSmilRootLayoutElementImpl.java74 private int parseAbsoluteLength(String length) { in parseAbsoluteLength() argument
75 if (length.endsWith("px")) { in parseAbsoluteLength()
76 length = length.substring(0, length.indexOf("px")); in parseAbsoluteLength()
79 return Integer.parseInt(length); in parseAbsoluteLength()
DSmilRegionElementImpl.java254 private int parseRegionLength(String length, boolean horizontal) { in parseRegionLength() argument
255 if (length.endsWith("px")) { in parseRegionLength()
256 length = length.substring(0, length.indexOf("px")); in parseRegionLength()
257 return Integer.parseInt(length); in parseRegionLength()
258 } else if (length.endsWith("%")) { in parseRegionLength()
259 double value = 0.01*Integer.parseInt(length.substring(0, length.length() - 1)); in parseRegionLength()
267 return Integer.parseInt(length); in parseRegionLength()
/packages/apps/Phone/src/com/android/phone/
DProcessOutgoingCallTest.java53 if (SEVEN_DIGIT_DIALING && number.length() == 7) { in onReceive()
70 int length = number.length(); in onReceive() local
71 if (BLOCK_555 && length >= 7) { in onReceive()
72 String exchange = number.substring(length - 7, length - 4); in onReceive()
/packages/apps/Email/tests/src/com/android/email/mail/internet/
DMimeMessageTest.java90 assertEquals(1, headers.length); in doTestSetSentDate()
163 assertEquals("64 shouldn't fold", 1, split.length); in testSetSubjectPlain()
169 assertTrue("long subject should fold", split.length > 1); in testSetSubjectPlain()
171 assertTrue("split lines max length 78", s.length() <= 76); // 76+\r\n = 78 in testSetSubjectPlain()
210 assertTrue("long subject should fold", split.length > 1); in testSetLongSubject()
212 assertTrue("split lines max length 78", s.length() <= 76); // 76+\r\n = 78 in testSetLongSubject()
243 assertEquals("from address count", 1, from.length); in testEncodingAddressField()
246 assertEquals("to address count", 1, to.length); in testEncodingAddressField()
250 assertEquals("cc address count", 1, cc.length); in testEncodingAddressField()
257 assertEquals("reply-to address count", 1, replyTo.length); in testEncodingAddressField()
[all …]
/packages/apps/Email/src/org/apache/commons/io/
DFilenameUtils.java264 int size = filename.length(); in doNormalize()
274 filename.getChars(0, filename.length(), array, 0); in doNormalize()
277 for (int i = 0; i < array.length; i++) { in doNormalize()
404 int len = basePath.length(); in concat()
496 int len = filename.length(); in getPrefixLength()
627 if (len > filename.length()) { in getPrefix()
702 if (prefix >= filename.length() || index < 0) { in doGetPath()
782 if (prefix >= filename.length()) { in doGetFullPath()
1014 if (extension == null || extension.length() == 0) { in isExtension()
1036 if (extensions == null || extensions.length == 0) { in isExtension()
[all …]
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/
DOpenWnnDictionaryImpl.java435 if( keyString.length() <= FAST_QUERY_LENGTH ) { in createQuery()
465 queryArgs = new String[ queryArgsTemp.length + 2 ]; in createQuery()
466 for( int i = 0 ; i < queryArgsTemp.length ; i++ ) { in createQuery()
539 if( keyString.length() > 0 ) { in searchWord()
628 public WnnWord getNextWord( int length ) { in getNextWord() argument
638 … ( length > 0 && mDbCursor.getString( 0 ).length( ) != length ) ) ) { in getNextWord()
676 int res = OpenWnnDictionaryImplJni.getNextWord( this.mWnnWork, length ); in getNextWord()
860 if( count + word.length > MAX_WORDS_IN_USER_DICTIONARY ) { in addWordToUserDictionary()
869 for( int index = 0 ; index < word.length ; index++ ) { in addWordToUserDictionary()
870 … if( word[index].stroke.length() > 0 && word[index].stroke.length() <= MAX_STROKE_LENGTH && in addWordToUserDictionary()
[all …]

12345678910>>...20