/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()
|
D | OutputStreamDataSink.java | 52 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 53 mOut.write(buf, offset, length); in consume() 71 int chunkSize = Math.min(buf.remaining(), tmp.length); in consume()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | FixedByteArrayOutputStream.java | 60 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()
|
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()
|
D | QuotationAwareTokenizer.java | 77 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()
|
D | ByteArrayList.java | 159 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/ |
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/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 | 56 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()
|
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 …]
|
D | Dummy83BufferGenerator.java | 66 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()
|
D | FatFile.java | 85 public void setLength(long length) throws ReadOnlyException, IOException { in setLength() argument 88 if (getLength() == length) return; in setLength() 91 chain.setSize(length); in setLength() 94 this.entry.setLength(length); in setLength()
|
/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()
|
D | DataSourceFromRAFChunkTest.java | 51 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()
|
D | DataSinkFromRAFTest.java | 53 if (f.length() > Integer.MAX_VALUE) { in getContents() 54 throw new IOException("File too large: " + f.length()); in getContents() 56 byte[] contents = new byte[(int) f.length()]; in getContents()
|
/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()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | CollectingOutputReceiver.java | 54 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/util/ |
D | StreamUtilTest.java | 46 assertEquals(contentBytes.length, outputBytes.length); in testGetByteArrayListFromSource() 47 for (int i = 0; i < contentBytes.length; ++i) { in testGetByteArrayListFromSource() 62 assertEquals(contentBytes.length, outputBytes.length); in testGetByteArrayListFromStream() 63 for (int i = 0; i < contentBytes.length; ++i) { in testGetByteArrayListFromStream()
|
D | FixedByteArrayOutputStreamTest.java | 88 String expected = TEXT.substring(TEXT.length() - BUF_SIZE); in testBufferPlusPlus() 102 String expected = full.substring(full.length() - BUF_SIZE); in testWriteWithWrap() 115 mOutStream.write(text.getBytes(), offset, text.length() - offset); in testLessThanBufferWithOffset() 132 String expected = full.substring(full.length() - BUF_SIZE); in testWriteWithOffsetAndWrap() 134 mOutStream.write(followup.getBytes(), offset, followup.length() - offset); in testWriteWithOffsetAndWrap()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | DeviceFileReporterTest.java | 56 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 …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/log/ |
D | LogUtilFuncTest.java | 51 CLog.v("this is CLog.v with a format string: %s has length %d", STRING, STRING.length()); in testCLog_v() 57 CLog.d("this is CLog.d with a format string: %s has length %d", STRING, STRING.length()); in testCLog_d() 63 CLog.i("this is CLog.i with a format string: %s has length %d", STRING, STRING.length()); in testCLog_i() 69 CLog.w("this is CLog.w with a format string: %s has length %d", STRING, STRING.length()); in testCLog_w() 75 CLog.e("this is CLog.e with a format string: %s has length %d", STRING, STRING.length()); in testCLog_e() 96 STRING, STRING.length()); in testCLog_wtf()
|
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/ |
D | V2SchemeSigner.java | 247 MessageDigest[] mds = new MessageDigest[digestAlgorithmsArray.length]; in computeContentDigests() 248 byte[][] digestsOfChunks = new byte[digestAlgorithmsArray.length][]; in computeContentDigests() 249 int[] digestOutputSizes = new int[digestAlgorithmsArray.length]; in computeContentDigests() 250 for (int i = 0; i < digestAlgorithmsArray.length; i++) { in computeContentDigests() 285 for (int i = 0; i < mds.length; i++) { in computeContentDigests() 293 for (int i = 0; i < digestAlgorithmsArray.length; i++) { in computeContentDigests() 314 Map<ContentDigestAlgorithm, byte[]> result = new HashMap<>(digestAlgorithmsArray.length); in computeContentDigests() 315 for (int i = 0; i < digestAlgorithmsArray.length; i++) { in computeContentDigests() 357 + 8 + 4 + apkSignatureSchemeV2Block.length // v2Block as ID-value pair in generateApkSigningBlock() 366 long pairSizeFieldValue = 4 + apkSignatureSchemeV2Block.length; in generateApkSigningBlock() [all …]
|