Home
last modified time | relevance | path

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

12345678910>>...12

/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()
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()
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()
DTeeDataSink.java35 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument
37 sink.consume(buf, offset, length); in consume()
44 for (int i = 0; i < mSinks.length; i++) { in consume()
/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/tradefederation/core/src/com/android/tradefed/util/
DFixedByteArrayOutputStream.java60 mBuffer.length - mWritePos); in getData()
72 if (mWritePos >= mBuffer.length) { in write()
83 if (len >= mBuffer.length) { in write()
85 System.arraycopy(b, off + len - mBuffer.length, mBuffer, 0, mBuffer.length); in write()
90 int freeSpace = mBuffer.length - mWritePos; in write()
102 if (mWritePos > mBuffer.length) { in write()
104 mWritePos = mWritePos % mBuffer.length; in write()
114 return mBuffer.length; in size()
DArrayUtil.java44 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()
DTableBuilder.java75 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()
DQuotationAwareTokenizer.java77 if (token.length() > 0) { in tokenizeLine()
82 token.delete(0, token.length()); in tokenizeLine()
103 if (token.length() > 0) { in tokenizeLine()
106 token.delete(0, token.length()); in tokenizeLine()
133 for (int i=0; i < tokens.length; i++) { in combineTokens()
143 if (i < (tokens.length - 1)) { in combineTokens()
DByteArrayList.java159 return addAll(src, 0, src.length); in addAll()
170 public boolean addAll(byte[] src, int srcOffset, int length) { in addAll() argument
175 ensureCapacity(mCurBytes + length); in addAll()
176 System.arraycopy(src, srcOffset, mStorage, mCurBytes, length); in addAll()
177 mCurBytes += length; in addAll()
/tools/apksig/src/main/java/com/android/apksig/internal/jar/
DManifestParser.java46 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/apksig/src/apksigner/java/com/android/apksigner/
DOptionsParser.java56 if (mIndex >= mParams.length) { in nextOption()
79 return param.substring("--".length(), valueDelimiterIndex); in nextOption()
81 return param.substring("--".length()); in nextOption()
85 return param.substring("-".length()); in nextOption()
106 if (mIndex >= mParams.length) { in getRequiredValue()
156 if (mIndex >= mParams.length) { in getOptionalBooleanValue()
177 if (mIndex >= mParams.length) { in getRemainingParams()
183 return Arrays.copyOfRange(mParams, mIndex + 1, mParams.length); in getRemainingParams()
185 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/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/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/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.java51 raf.seek(raf.length()); in testFileSizeChangesNotVisible()
67 byte[] fullContents = new byte[2 + contents.length + 1]; in createDataSource()
70 System.arraycopy(contents, 0, fullContents, 2, contents.length); in createDataSource()
71 fullContents[fullContents.length - 1] = '9'; in createDataSource()
85 DataSources.asDataSource(f, 2, contents.length), in createDataSource()
/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/test/connectivity/acts/framework/acts/test_utils/audio_analysis_lib/
Daudio_analysis.py121 length = len(y_conv_w)
124 x_f = _rfft_freq(length, rate)
125 y_f = 2.0 / length * numpy.fft.rfft(y_conv_w)
150 def _rfft_freq(length, rate): argument
164 val = rate / float(length)
166 result_length = length // 2 + 1
192 length = len(array)
245 while mid < length:
247 right = min(length - 1, mid + half_window_size)
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DHexEncoding.java35 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()
/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/tradefederation/core/src/com/android/tradefed/device/
DCollectingOutputReceiver.java54 public void addOutput(byte[] data, int offset, int length) { in addOutput() argument
58 s = new String(data, offset, length, "ISO-8859-1"); //$NON-NLS-1$ in addOutput()
61 s = new String(data, offset,length); in addOutput()
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DDeviceFileReporterTest.java56 public long length() { in length() method in DeviceFileReporterTest.FakeFile
86 .andReturn(new FakeFile(filename, tombstone.length())); in testSimple()
111 .andReturn(new FakeFile(filename, tombstone.length())); in testTrim()
139 new FakeFile(filename, tombstone.length())); in testLineEnding_LF()
166 new FakeFile(filename, tombstone.length())); in testLineEnding_CRLF()
215 .andReturn(new FakeFile(pngFilename, pngContents.length())); in testRepeat_skip()
222 .andReturn(new FakeFile(xmlFilename, xmlContents.length())); in testRepeat_skip()
272 .andReturn(new FakeFile(pngFilename, pngContents.length())); in testRepeat_noSkip()
280 .andReturn(new FakeFile(pngFilename, pngContents.length())); in testRepeat_noSkip()
284 .andReturn(new FakeFile(xmlFilename, xmlContents.length())); in testRepeat_noSkip()
[all …]

12345678910>>...12