Home
last modified time | relevance | path

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

123456

/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/
DAlignmentTest.java62 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/util/
DRandomAccessFileDataSink.java66 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()
DByteArrayDataSink.java49 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()
DByteBufferSink.java40 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()
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/
DDataSlice.kt40 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/external/fat32lib/src/main/java/de/waldheinz/fs/fat/
DShortName.java53 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 …]
DDummy83BufferGenerator.java66 for (int src=0; src < dirty.length(); src++) { in tidyString()
81 for (int i=0; i < s.length(); i++) { in cleanString()
90 final StringBuilder sb = new StringBuilder(str.length()); in stripLeadingPeriods()
92 for (int i=0; i < str.length(); i++) { in stripLeadingPeriods()
158 invalidchar[randomNumber % invalidchar.length]; in generate83BufferNew()
159 randomNumber /= invalidchar.length; in generate83BufferNew()
160 if (randomNumber < invalidchar.length) in generate83BufferNew()
/tools/test/connectivity/acts_tests/acts_contrib/test_utils/audio_analysis_lib/
Daudio_quality_measurement.py223 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/apksig/src/apksigner/java/com/android/apksigner/
DOptionsParser.java59 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()
DHexEncoding.java34 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/metalava/src/main/java/com/android/tools/metalava/model/text/
DTextTypeParameterItem.kt71 val length = typeParameterString.length in create() constant
72 var nameEnd = length in create()
73 for (i in 0 until length) { in create()
107 var start = index + "extends ".length in bounds()
108 val length = s.length in bounds() constant
109 for (i in start until length) { in bounds()
126 if (start < length) { in bounds()
127 add(list, typeString, start, length) in bounds()
/tools/test/connectivity/acts_tests/acts_contrib/test_utils/tel/
Dtel_sms_utils.py34 for length in message_lengths:
35 message_array = [rand_ascii_str(length)]
38 ads[0].log.error("SMS of length %s test failed", length)
41 ads[0].log.info("SMS of length %s test succeeded", length)
60 for length in long_message_lengths:
61 message_array = [rand_ascii_str(length)]
64 ads[0].log.warning("SMS of length %s test failed", length)
67 ads[0].log.info("SMS of length %s test succeeded", length)
Dtel_mms_utils.py42 for length in message_lengths:
43 message_array = [("Test Message", rand_ascii_str(length), None)]
50 log.warning("MMS of body length %s test failed", length)
53 log.info("MMS of body length %s test succeeded", length)
71 for length in long_message_lengths:
72 message_array = [("Test Message", rand_ascii_str(length), None)]
75 log.warning("MMS of body length %s test failed", length)
78 log.info("MMS of body length %s test succeeded", length)
/tools/security/gdb/heap_print/
Dheap_print_script.py28 def put(address, length): argument
29 HeapMapping.address_length_mapping[address] = length
86 def __init__(self, length, prev_address=None): argument
88 self.length = length
105 HeapMapping.put(int_address, self.length)
122 length = int(parse_gdb_equals(func_args_string))
123 AllocationFinishedBreakpoint(length)
142 length = int(parse_gdb_equals(args[1]))
143 AllocationFinishedBreakpoint(length, int_address)
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/compress/
DMultiCompressorTest.java52 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/apksig/src/test/java/com/android/apksig/util/
DDataSinkTestBase.java58 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()
DDataSourceFromRAFChunkTest.java59 raf.seek(raf.length()); in testFileSizeChangesNotVisible()
75 byte[] fullContents = new byte[2 + contents.length + 1]; in createDataSource()
78 System.arraycopy(contents, 0, fullContents, 2, contents.length); in createDataSource()
79 fullContents[fullContents.length - 1] = '9'; in createDataSource()
93 factory.create(f, 2, contents.length), in createDataSource()
/tools/test/connectivity/acts_tests/tests/google/tel/live/msim/
DTelLiveMSIMSmsTest.py51 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/
DByteArrayList.kt47 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/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/utils/
DRandomAccessFileUtils.java43 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()
DByteTracker.java50 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/sign/
DFullApkSignTest.java79 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/apkzlib/src/test/java/com/android/tools/build/apkzlib/utils/
DApkZFileTestUtils.java48 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/metalava/src/main/java/com/android/tools/metalava/apilevels/
DApiGenerator.java43 for (int i = 0; i < args.length && !error; i++) { in main()
48 if (i < args.length) { in main()
56 if (i < args.length) { in main()
68 if (i < args.length) { in main()
76 if (i < args.length) { in main()
89 if (i < args.length) { in main()
95 } else if (arg.length() >= 2 && arg.startsWith("--")) { in main()
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/
DAsn1DerEncoder.java144 contentLen += serializedField.length; in toSequence()
152 … System.arraycopy(serializedField, 0, unencodedResult, index, serializedField.length); in toSequence()
153 index += serializedField.length; in toSequence()
202 int commonLength = Math.min(arr1.length, arr2.length); in compare()
209 return arr1.length - arr2.length; in compare()
217 List<AnnotatedField> result = new ArrayList<>(declaredFields.length); in getAnnotatedFields()
272 if (nodes.length < 2) { in toOid()
302 for (int i = 2; i < nodes.length; i++) { in toOid()
449 contentsLength += c.length; in createTag()
493 System.arraycopy(c, 0, result, contentsPosInResult, c.length); in createTag()
[all …]

123456