/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ByteArrayUtil.java | 44 byte[] bytes, int offset, int length, int containerSize) { in getByteBuffer() argument 46 for (int i = 0; i < length; i++) { in getByteBuffer() 63 public static int getInt(byte[] bytes, int offset, int length) { in getInt() argument 64 return getByteBuffer(bytes, offset, length, 4).getInt(); in getInt() 78 public static long getLong(byte[] bytes, int offset, int length) { in getLong() argument 79 return getByteBuffer(bytes, offset, length, 8).getLong(); in getLong() 89 public static String getString(byte[] bytes, int offset, int length) { in getString() argument 90 return new String(Arrays.copyOfRange(bytes, offset, offset + length)); in getString()
|
D | ArrayUtil.java | 44 int length = 0; in buildArray() local 46 length += array.length; in buildArray() 48 String[] newArray = new String[length]; in buildArray() 51 System.arraycopy(array, 0, newArray, offset, array.length); in buildArray() 52 offset += array.length; in buildArray() 67 List<T> retList = new ArrayList<T>(inputAry.length); in list() 106 if ((pieces.length == 1) && (pieces[0] instanceof Collection)) { in join()
|
/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
D | RandomAccessFileDataSink.java | 66 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 72 if (offset > buf.length) { in consume() 76 "offset: " + offset + ", buf.length: " + buf.length); in consume() 78 if (length == 0) { in consume() 84 mFile.write(buf, offset, length); in consume() 85 mPosition += length; in consume() 91 int length = buf.remaining(); in consume() local 92 if (length == 0) { in consume() 101 mPosition += length; in consume()
|
D | ByteBufferSink.java | 40 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 42 mBuffer.put(buf, offset, length); in consume() 45 "Insufficient space in output buffer for " + length + " bytes", e); in consume() 51 int length = buf.remaining(); in consume() local 56 "Insufficient space in output buffer for " + length + " bytes", e); in consume()
|
D | ByteArrayDataSink.java | 49 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 55 if (offset > buf.length) { in consume() 59 "offset: " + offset + ", buf.length: " + buf.length); in consume() 61 if (length == 0) { in consume() 65 ensureAvailable(length); in consume() 66 System.arraycopy(buf, offset, mArray, mSize, length); in consume() 67 mSize += length; in consume() 85 int chunkSize = Math.min(buf.remaining(), tmp.length); in consume() 98 if (minCapacity <= mArray.length) { in ensureAvailable() 105 int doubleCurrentSize = (int) Math.min(mArray.length * 2L, Integer.MAX_VALUE); in ensureAvailable()
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/ |
D | AlignmentTest.java | 62 byte found[] = readSegment(newZFile, 1024, testBytes.length); in addAlignedFile() 78 assertTrue(newZFile.length() < 1024); in addNonAlignedFile() 101 assertTrue(newZFile.length() < 1024); 120 assertArrayEquals(testBytes1, readSegment(newZFile, 1024, testBytes1.length)); 122 assertTrue(newZFile.length() > 1024); 138 assertTrue(newZFile.length() < 1024); 163 assertArrayEquals(testBytes0, readSegment(newZFile, off0, testBytes0.length)); 164 assertArrayEquals(testBytes1, readSegment(newZFile, off1, testBytes1.length)); 180 assertArrayEquals(testBytes, readSegment(newZFile, 1024, testBytes.length)); 182 int flen = (int) newZFile.length(); [all …]
|
/tools/apksig/src/main/java/com/android/apksig/internal/jar/ |
D | ManifestParser.java | 46 this(data, 0, data.length); in ManifestParser() 52 public ManifestParser(byte[] data, int offset, int length) { in ManifestParser() argument 55 mEndOffset = offset + length; in ManifestParser() 83 } while (attr.length() == 0); in readSection() 90 if ((attr == null) || (attr.length() == 0)) { in readSection() 114 attr.substring(delimiterIndex + ": ".length())); in parseAttr() 126 } else if (bytes.length == 0) { in readAttribute() 139 if ((mBufferedLine != null) && (mBufferedLine.length == 0)) { in readAttributeBytes() 157 if (line.length == 0) { in readAttributeBytes() 170 if ((line.length == 0) || (line[0] != ' ')) { in readAttributeBytes() [all …]
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/ |
D | DataSlice.kt | 40 inline val length: Int get() = endIndex - startIndex constant in trebuchet.io.DataSlice 52 if (length != other.length) return false in equals() 80 override fun toString() = String(buffer, startIndex, length) in toString() 83 if (length - buffer.size < 50) { in toString() 90 fun ByteArray.asSlice(length: Int = this.size) = DataSlice(this, 0, length) in ByteArray() 96 override val length: Int get() = data.length in ByteArray() constant
|
/tools/loganalysis/src/com/android/loganalysis/util/ |
D | ArrayUtil.java | 45 int length = 0; in buildArray() local 47 length += array.length; in buildArray() 49 String[] newArray = new String[length]; in buildArray() 52 System.arraycopy(array, 0, newArray, offset, array.length); in buildArray() 53 offset += array.length; in buildArray() 68 List<T> retList = new ArrayList<T>(inputAry.length); in list() 107 if ((pieces.length == 1) && (pieces[0] instanceof Collection)) { in join()
|
/tools/apksig/src/apksigner/java/com/android/apksigner/ |
D | OptionsParser.java | 59 if (mIndex >= mParams.length) { in nextOption() 85 return param.substring("--".length(), valueDelimiterIndex); in nextOption() 87 return param.substring("--".length()); in nextOption() 91 return param.substring("-".length()); in nextOption() 121 if (mIndex >= mParams.length) { in getRequiredValue() 171 if (mIndex >= mParams.length) { in getOptionalBooleanValue() 192 if (mIndex >= mParams.length) { in getRemainingParams() 198 return Arrays.copyOfRange(mParams, mIndex + 1, mParams.length); in getRemainingParams() 200 return Arrays.copyOfRange(mParams, mIndex, mParams.length); in getRemainingParams()
|
D | HexEncoding.java | 34 public static String encode(byte[] data, int offset, int length) { in encode() argument 35 StringBuilder result = new StringBuilder(length * 2); in encode() 36 for (int i = 0; i < length; i++) { in encode() 48 return encode(data, 0, data.length); in encode()
|
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/ |
D | ShortName.java | 53 if (nameExt.length() > 12) in ShortName() 81 System.arraycopy(nameArr, 0, result, 0, nameArr.length); in ShortName() 82 System.arraycopy(extArr, 0, result, 8, extArr.length); in ShortName() 92 System.arraycopy(name.toCharArray(), 0, result, 0, name.length()); in toCharArray() 93 System.arraycopy(ext.toCharArray(), 0, result, 8, ext.length()); in toCharArray() 155 for (int i = 0; i < nameArr.length; i++) { in parse() 160 for (int i = 0; i < extArr.length; i++) { in parse() 180 for (int i = 0; i < this.name.length; i++) { in toString() 204 if (str.length() < minLength) in checkString() 208 if (str.length() > maxLength) in checkString() [all …]
|
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/ |
D | TextTypeParameterItem.kt | 72 val length = typeParameterString.length in create() constant 73 var nameEnd = length in create() 74 for (i in 0 until length) { in create() 108 var start = index + "extends ".length in bounds() 109 val length = s.length in bounds() constant 110 for (i in start until length) { in bounds() 127 if (start < length) { in bounds() 128 add(list, typeString, start, length) in bounds()
|
/tools/test/connectivity/acts/tests/google/tel/live/msim/ |
D | TelLiveMSIMSmsTest.py | 51 for length in self.message_lengths: 52 message_array = [rand_ascii_str(length)] 54 length, slot, slot) 59 length, slot, slot) 62 length, slot, 1-slot) 67 length, slot, 1-slot) 70 ads[0].log.info("SMS of length %s test succeeded", length)
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/util/ |
D | ByteArrayList.kt | 47 fun put(buf: ByteArray, offset: Int, length: Int) { in put() 48 capacity = size + length in put() 49 System.arraycopy(buf, offset, array, size, length) in put() 50 size += length in put() 54 put(slice.buffer, slice.startIndex, slice.length) in put()
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSinkTestBase.java | 58 sink.consume(input, input.length - 2, 0); in testConsumeFromArray() 59 sink.consume(input, input.length - 1, 0); in testConsumeFromArray() 60 sink.consume(input, input.length, 0); in testConsumeFromArray() 65 assertConsumeArrayThrowsIOOB(sink, input, 0, input.length + 1); in testConsumeFromArray() 66 assertConsumeArrayThrowsIOOB(sink, input, input.length - 2, 4); in testConsumeFromArray() 67 assertConsumeArrayThrowsIOOB(sink, input, input.length + 1, 0); in testConsumeFromArray() 68 assertConsumeArrayThrowsIOOB(sink, input, input.length + 1, 1); in testConsumeFromArray() 125 DataSink sink, byte[] arr, int offset, int length) throws IOException { in assertConsumeArrayThrowsIOOB() argument 127 sink.consume(arr, offset, length); in assertConsumeArrayThrowsIOOB()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | TableBuilder.java | 75 int blanks = mRowLength - mText.length() - 2; in build() 106 if (text.length() > width) { in build() 111 addPadding(width - text.length()); in build() 131 for (int i = 0; i < mColumns.length; i++) { in build() 134 addPadding(mColumnWidth[i] - mColumns[i].length() + mPadding); in build() 244 if (line.length != mColumns) { in addLine() 246 String.format("Expect %d columns, actual %d columns", mColumns, line.length)); in addLine() 250 if (line[i].length() > mColumnWidth[i]) { in addLine() 251 mColumnWidth[i] = line[i].length(); in addLine()
|
D | QuotationAwareTokenizer.java | 83 if (token.length() > 0) { in tokenizeLine() 88 token.delete(0, token.length()); in tokenizeLine() 109 if (token.length() > 0) { in tokenizeLine() 112 token.delete(0, token.length()); in tokenizeLine() 154 for (int i=0; i < tokens.length; i++) { in combineTokens() 164 if (i < (tokens.length - 1)) { in combineTokens()
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/compress/ |
D | MultiCompressorTest.java | 52 byte[] resultAll = new byte[data.length * 2]; in compress() 92 assertTrue(ci.getCompressedSize() < data.length); in sameCompressionResultButBetterThanStore() 99 int bestSize = compress(data, Deflater.BEST_COMPRESSION).length; 100 int defaultSize = compress(data, Deflater.DEFAULT_COMPRESSION).length; 120 long defaultFileSize = defaultFile.length(); 121 long resultFileSize = resultFile.length(); 129 int bestSize = compress(data, Deflater.BEST_COMPRESSION).length; 130 int defaultSize = compress(data, Deflater.DEFAULT_COMPRESSION).length; 150 long defaultFileSize = defaultFile.length(); 151 long resultFileSize = resultFile.length();
|
/tools/test/connectivity/acts/framework/acts/test_utils/audio_analysis_lib/ |
D | audio_quality_measurement.py | 223 teager_value, length = 0, len(wave) 224 for i in range(1, length - 1): 228 teager_value = (float(teager_value) / length) / (amplitude**2) 312 length = len(signal) 314 for left_border in range(0, length, hilbert_block): 315 right_border = min(length, left_border + hilbert_block) 317 temp_right_border = min(length, right_border + half_hilbert_block) 352 length = len(arr) 356 left_average_array = numpy.zeros(length) 357 right_average_array = numpy.zeros(length) [all …]
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/utils/ |
D | RandomAccessFileUtils.java | 43 while ((r = raf.read(data, p, data.length - p)) > 0) { in fullyRead() 45 if (p == data.length) { in fullyRead() 50 if (p < data.length) { in fullyRead() 53 + data.length in fullyRead()
|
D | ByteTracker.java | 50 updateUsage(data.length); in fromStream() 51 return new CloseableDelegateByteSource(ByteSource.wrap(data), data.length) { in fromStream() 70 updateUsage(data.length); 71 return new CloseableDelegateByteSource(ByteSource.wrap(data), data.length) {
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/utils/ |
D | ApkZFileTestUtils.java | 48 public static byte[] readSegment(@Nonnull File file, long start, int length) throws Exception { in readSegment() argument 50 Preconditions.checkArgument(length >= 0, "length < 0"); in readSegment() 56 data = new byte[length]; in readSegment() 58 while (tot < length) { in readSegment() 59 int r = raf.read(data, tot, length - tot); in readSegment()
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/sign/ |
D | FullApkSignTest.java | 79 int f1DataStart = ZFileTestConstants.LOCAL_HEADER_SIZE + f1Name.length(); in testSignature() 80 int f1DataEnd = f1DataStart + f1Data.length; in testSignature() 81 int f2DataStart = f1DataEnd + ZFileTestConstants.LOCAL_HEADER_SIZE + f2Name.length(); in testSignature() 82 int f2DataEnd = f2DataStart + f2Data.length; in testSignature() 84 byte[] read1 = ApkZFileTestUtils.readSegment(out, f1DataStart, f1Data.length); in testSignature() 86 byte[] read2 = ApkZFileTestUtils.readSegment(out, f2DataStart, f2Data.length); in testSignature()
|
/tools/apksig/src/test/java/com/android/apksig/internal/util/ |
D | HexEncoding.java | 35 return encode(data, 0, data.length); in encode() 63 int resultLengthBytes = (encoded.length() + 1) / 2; in decode() 67 if ((encoded.length() % 2) != 0) { in decode() 73 for (int len = encoded.length(); encodedCharOffset < len; encodedCharOffset += 2) { in decode()
|