/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
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() 57 public void consume(ByteBuffer buf) throws IOException { in consume() argument 58 if (!buf.hasRemaining()) { in consume() 62 if (buf.hasArray()) { in consume() 64 buf.array(), in consume() 65 buf.arrayOffset() + buf.position(), in consume() 66 buf.remaining()); in consume() 67 buf.position(buf.limit()); in consume() 69 byte[] tmp = new byte[Math.min(buf.remaining(), MAX_READ_CHUNK_SIZE)]; in consume() [all …]
|
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() 66 System.arraycopy(buf, offset, mArray, mSize, length); in consume() 71 public void consume(ByteBuffer buf) throws IOException { in consume() argument 72 if (!buf.hasRemaining()) { in consume() 76 if (buf.hasArray()) { in consume() 77 consume(buf.array(), buf.arrayOffset() + buf.position(), buf.remaining()); in consume() 78 buf.position(buf.limit()); in consume() 82 ensureAvailable(buf.remaining()); in consume() [all …]
|
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() 84 mFile.write(buf, offset, length); in consume() 90 public void consume(ByteBuffer buf) throws IOException { in consume() argument 91 int length = buf.remaining(); in consume() 98 while (buf.hasRemaining()) { in consume() 99 mFileChannel.write(buf); in consume()
|
D | MessageDigestSink.java | 35 public void consume(byte[] buf, int offset, int length) { in consume() argument 37 md.update(buf, offset, length); in consume() 42 public void consume(ByteBuffer buf) { in consume() argument 43 int originalPosition = buf.position(); in consume() 47 buf.position(originalPosition); in consume() 48 md.update(buf); in consume()
|
D | TeeDataSink.java | 35 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 37 sink.consume(buf, offset, length); in consume() 42 public void consume(ByteBuffer buf) throws IOException { in consume() argument 43 int originalPosition = buf.position(); in consume() 46 buf.position(originalPosition); in consume() 48 mSinks[i].consume(buf); 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() 50 public void consume(ByteBuffer buf) throws IOException { in consume() argument 51 int length = buf.remaining(); in consume() 53 mBuffer.put(buf); in consume()
|
D | ByteBufferUtils.java | 28 public static byte[] toByteArray(ByteBuffer buf) { in toByteArray() argument 29 byte[] result = new byte[buf.remaining()]; in toByteArray() 30 buf.get(result); in toByteArray()
|
/tools/apksig/src/test/java/com/android/apksig/internal/util/ |
D | ByteBufferSinkTestBase.java | 31 ByteBuffer buf = createBuffer(1024); in createDataSink() local 34 buf.position(START_POS); in createDataSink() 35 buf.limit(buf.capacity() - 300); in createDataSink() 36 return CloseableWithDataSink.of(new ByteBufferSink(buf)); in createDataSink() 41 ByteBuffer buf = dataSink.getBuffer(); in getContents() local 42 int oldPos = buf.position(); in getContents() 43 int oldLimit = buf.limit(); in getContents() 45 buf.position(START_POS); in getContents() 46 buf.limit(oldPos); in getContents() 47 return buf.slice(); in getContents() [all …]
|
D | HexEncoding.java | 54 public static String encode(ByteBuffer buf) { in encode() argument 55 return encode(buf.array(), buf.arrayOffset() + buf.position(), buf.remaining()); in encode()
|
D | ByteStreams.java | 34 byte[] buf = new byte[16384]; in toByteArray() 36 while ((chunkSize = in.read(buf)) != -1) { in toByteArray() 37 result.write(buf, 0, chunkSize); in toByteArray()
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSourceTestBase.java | 204 ByteBuffer buf = ByteBuffer.allocate(5); in testCopyTo() local 205 buf.position(2); in testCopyTo() 206 buf.limit(3); in testCopyTo() 207 assertCopyToThrowsBufferOverflow(ds, 0, 2, buf); in testCopyTo() 208 buf.position(2); in testCopyTo() 209 buf.limit(3); in testCopyTo() 210 assertCopyToThrowsBufferOverflow(slice, 1, 2, buf); in testCopyTo() 213 buf = ByteBuffer.allocate(10); in testCopyTo() 214 buf.position(2); in testCopyTo() 215 assertCopyToEquals("bcd", ds, 1, 3, buf); in testCopyTo() [all …]
|
D | DataSourceFromByteBufferTest.java | 34 ByteBuffer buf = ByteBuffer.wrap("abcdefgh".getBytes(StandardCharsets.UTF_8)); in testChangesToBufferPosAndLimitNotVisible() local 35 buf.position(1); in testChangesToBufferPosAndLimitNotVisible() 36 buf.limit(4); in testChangesToBufferPosAndLimitNotVisible() 37 DataSource ds = DataSources.asDataSource(buf); in testChangesToBufferPosAndLimitNotVisible() 38 buf.position(2); in testChangesToBufferPosAndLimitNotVisible() 39 buf.limit(buf.capacity()); in testChangesToBufferPosAndLimitNotVisible()
|
D | DataSinkTestBase.java | 115 private static String toString(ByteBuffer buf) { in toString() argument 116 return DataSourceTestBase.toString(buf); in toString()
|
/tools/apksig/src/main/java/com/android/apksig/internal/zip/ |
D | CentralDirectoryRecord.java | 130 public static CentralDirectoryRecord getRecord(ByteBuffer buf) throws ZipFormatException { in getRecord() argument 131 ZipUtils.assertByteOrderLittleEndian(buf); in getRecord() 132 if (buf.remaining() < HEADER_SIZE_BYTES) { in getRecord() 135 + " bytes, available: " + buf.remaining() + " bytes", in getRecord() 138 int originalPosition = buf.position(); in getRecord() 139 int recordSignature = buf.getInt(); in getRecord() 145 buf.position(originalPosition + GP_FLAGS_OFFSET); in getRecord() 146 short gpFlags = buf.getShort(); in getRecord() 147 short compressionMethod = buf.getShort(); in getRecord() 148 int lastModificationTime = ZipUtils.getUnsignedInt16(buf); in getRecord() [all …]
|
D | ZipUtils.java | 181 ByteBuffer buf = zip.getByteBuffer(bufOffsetInFile, maxEocdSize); in findZipEndOfCentralDirectoryRecord() local 182 buf.order(ByteOrder.LITTLE_ENDIAN); in findZipEndOfCentralDirectoryRecord() 183 int eocdOffsetInBuf = findZipEndOfCentralDirectoryRecord(buf); in findZipEndOfCentralDirectoryRecord() 189 buf.position(eocdOffsetInBuf); in findZipEndOfCentralDirectoryRecord() 190 ByteBuffer eocd = buf.slice(); in findZipEndOfCentralDirectoryRecord() 306 byte[] buf = new byte[65536]; in deflate() 308 int chunkSize = deflater.deflate(buf); in deflate() 309 out.write(buf, 0, chunkSize); in deflate()
|
D | LocalFileRecord.java | 477 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 479 mInflater.setInput(buf, offset, length); in consume() 499 public void consume(ByteBuffer buf) throws IOException { in consume() argument 501 if (buf.hasArray()) { in consume() 502 consume(buf.array(), buf.arrayOffset() + buf.position(), buf.remaining()); in consume() 503 buf.position(buf.limit()); in consume() 508 while (buf.hasRemaining()) { in consume() 509 int chunkSize = Math.min(buf.remaining(), mInputBuffer.length); in consume() 510 buf.get(mInputBuffer, 0, chunkSize); in consume()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/remote/ |
D | RemoteManagerTest.java | 74 String buf = "test\n"; in testProcessClientOperations_invalidAction() local 75 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_invalidAction() 93 String buf = "{version=\"8\", type=\"START_HANDOVER\", port=\"5555\"}"; in testProcessClientOperations_initHandover() local 94 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_initHandover() 112 String buf = "{version=\"8\", type=\"ADD_COMMAND\", time=\"5\", commandArgs=[\"empty\"]}"; in testProcessClientOperations_addCommand() local 113 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_addCommand() 128 String buf = "{version=\"8\", type=\"ADD_COMMAND\", time=\"5\", commandArgs=[\"empty\"]}"; in testProcessClientOperations_addCommand_fail() local 129 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_addCommand_fail() 146 String buf = "{version=\"8\", type=\"ADD_COMMAND\", time=\"5\", commandArgs=[\"empty\"]}"; in testProcessClientOperations_addCommand_config() local 147 InputStream data = new ByteArrayInputStream(buf.getBytes()); in testProcessClientOperations_addCommand_config() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | StreamUtil.java | 162 byte[] buf = new byte[BUF_SIZE]; in copyStreams() 164 while ((size = inStream.read(buf)) != -1) { in copyStreams() 165 outStream.write(buf, 0, size); in copyStreams() 179 byte[] buf = new byte[BUF_SIZE]; in copyStreamToWriter() 181 while ((size = inStream.read(buf)) != -1) { in copyStreamToWriter() 182 writer.write(new String(buf, 0, size)); in copyStreamToWriter() 316 byte[] buf = new byte[BUF_SIZE]; in calculateMd5() 317 while (input.read(buf) != -1) { in calculateMd5()
|
/tools/apksig/src/main/java/com/android/apksig/util/ |
D | DataSink.java | 36 void consume(byte[] buf, int offset, int length) throws IOException; in consume() argument 45 void consume(ByteBuffer buf) throws IOException; in consume() argument
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/ |
D | ZFileDataSource.java | 110 byte[] buf = new byte[(int) Math.min(remaining, MAX_READ_CHUNK_SIZE)]; in feed() 112 int chunkSize = (int) Math.min(remaining, buf.length); in feed() 113 int readSize = file.directRead(chunkOffsetInFile, buf, 0, chunkSize); in feed() 118 sink.consume(buf, 0, readSize); in feed()
|
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/ber/ |
D | InputStreamBerDataValueReader.java | 282 byte[] buf = new byte[4096]; in skip() 283 int len = mIn.read(buf, 0, (int) Math.min(buf.length, n)); in skip() 285 mBuf.write(buf, 0, len); in skip()
|
D | ByteBufferBerDataValueReader.java | 28 public ByteBufferBerDataValueReader(ByteBuffer buf) { in ByteBufferBerDataValueReader() argument 29 if (buf == null) { in ByteBufferBerDataValueReader() 32 mBuf = buf; in ByteBufferBerDataValueReader()
|
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/ |
D | Asn1DerEncoder.java | 460 ByteBuffer buf = ((Asn1OpaqueObject) source).getEncoded(); in toDer() local 461 byte[] result = new byte[buf.remaining()]; in toDer() 462 buf.get(result); in toDer() 474 ByteBuffer buf = (ByteBuffer) source; in toDer() local 475 value = new byte[buf.remaining()]; in toDer() 476 buf.slice().get(value); in toDer()
|
/tools/apksig/src/test/java/com/android/apksig/internal/asn1/ |
D | Asn1BerParserTest.java | 58 HexEncoding.encode(parse("30050403123456", SequenceWithOctetString.class).buf)); in testOctetString() 60 "", HexEncoding.encode(parse("30020400", SequenceWithOctetString.class).buf)); in testOctetString() 360 public ByteBuffer buf; field in Asn1BerParserTest.SequenceWithOctetString
|
/tools/tradefederation/core/res/jacoco/ |
D | jacocoagent.jar | META-INF/MANIFEST.MF
META-INF/MTNMINDS.SF
META-INF/MTNMINDS ... |