/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
D | ByteArrayDataSink.java | 49 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 50 if (offset < 0) { in consume() 53 throw new IndexOutOfBoundsException("offset: " + offset); in consume() 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() 116 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument 117 checkChunkValid(offset, size); in getByteBuffer() 120 return ByteBuffer.wrap(mArray, (int) offset, size).slice(); in getByteBuffer() 124 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument [all …]
|
D | ChainedDataSource.java | 43 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument 44 if (offset + size > mTotalSize) { in feed() 50 if (offset >= src.size()) { in feed() 51 offset -= src.size(); in feed() 56 long remaining = src.size() - offset; in feed() 58 src.feed(offset, size, sink); in feed() 63 src.feed(offset, remaining, sink); in feed() 65 offset = 0; in feed() 70 public ByteBuffer getByteBuffer(long offset, int size) throws IOException { in getByteBuffer() argument 71 if (offset + size > mTotalSize) { in getByteBuffer() [all …]
|
D | FileChannelDataSource.java | 56 public FileChannelDataSource(FileChannel channel, long offset, long size) { in FileChannelDataSource() argument 57 if (offset < 0) { in FileChannelDataSource() 64 mOffset = offset; in FileChannelDataSource() 82 public FileChannelDataSource slice(long offset, long size) { in slice() argument 84 checkChunkValid(offset, size, sourceSize); in slice() 85 if ((offset == 0) && (size == sourceSize)) { in slice() 89 return new FileChannelDataSource(mChannel, mOffset + offset, size); in slice() 93 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument 95 checkChunkValid(offset, size, sourceSize); in feed() 100 long chunkOffsetInFile = mOffset + offset; in feed() [all …]
|
D | ByteBufferDataSource.java | 55 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument 56 checkChunkValid(offset, size); in getByteBuffer() 59 int chunkPosition = (int) offset; in getByteBuffer() 78 public void copyTo(long offset, int size, ByteBuffer dest) { in copyTo() argument 79 dest.put(getByteBuffer(offset, size)); in copyTo() 83 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument 87 sink.consume(getByteBuffer(offset, (int) size)); in feed() 91 public ByteBufferDataSource slice(long offset, long size) { in slice() argument 92 if ((offset == 0) && (size == mSize)) { in slice() 99 getByteBuffer(offset, (int) size), in slice() [all …]
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/ |
D | ZFileDataSource.java | 42 private final long offset; field in ZFileDataSource 57 offset = 0; in ZFileDataSource() 66 public ZFileDataSource(@Nonnull ZFile file, long offset, long size) { in ZFileDataSource() argument 67 Preconditions.checkArgument(offset >= 0, "offset < 0"); in ZFileDataSource() 70 this.offset = offset; in ZFileDataSource() 90 public DataSource slice(long offset, long size) { in slice() argument 92 checkChunkValid(offset, size, sourceSize); in slice() 93 if ((offset == 0) && (size == sourceSize)) { in slice() 97 return new ZFileDataSource(file, this.offset + offset, size); in slice() 101 public void feed(long offset, long size, @Nonnull DataSink sink) throws IOException { in feed() argument [all …]
|
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/ |
D | LittleEndian.java | 40 public static int getUInt8(byte[] src, int offset) { in getUInt8() argument 41 return src[offset] & 0xFF; in getUInt8() 50 public static int getUInt16(byte[] src, int offset) { in getUInt16() argument 51 final int v0 = src[offset + 0] & 0xFF; in getUInt16() 52 final int v1 = src[offset + 1] & 0xFF; in getUInt16() 62 public static long getUInt32(byte[] src, int offset) { in getUInt32() argument 63 final long v0 = src[offset + 0] & 0xFF; in getUInt32() 64 final long v1 = src[offset + 1] & 0xFF; in getUInt32() 65 final long v2 = src[offset + 2] & 0xFF; in getUInt32() 66 final long v3 = src[offset + 3] & 0xFF; in getUInt32() [all …]
|
D | Sector.java | 32 private final long offset; field in Sector 41 protected Sector(BlockDevice device, long offset, int size) { in Sector() argument 42 this.offset = offset; in Sector() 59 device.read(offset, buffer); in read() 85 device.write(offset, buffer); in write() 89 protected int get16(int offset) { in get16() argument 90 return buffer.getShort(offset) & 0xffff; in get16() 93 protected long get32(int offset) { in get32() argument 94 return buffer.getInt(offset) & 0xffffffff; in get32() 97 protected int get8(int offset) { in get8() argument [all …]
|
D | FatUtils.java | 46 long offset = resSects * sectSize; in getFatOffset() local 49 offset += fatNr * fatSize; in getFatOffset() 51 return offset; in getFatOffset() 66 long offset = getFatOffset(bs, 0); in getRootDirOffset() local 68 offset += fats * sectsPerFat * sectSize; in getRootDirOffset() 70 return offset; in getRootDirOffset() 81 long offset = getRootDirOffset(bs); in getFilesOffset() local 83 offset += bs.getRootDirEntryCount() * 32; in getFilesOffset() 85 return offset; in getFilesOffset()
|
D | ClusterChain.java | 197 public void readData(long offset, ByteBuffer dest) in readData() argument 207 int chainIdx = (int) (offset / clusterSize); in readData() 208 if (offset % clusterSize != 0) { in readData() 209 int clusOfs = (int) (offset % clusterSize); in readData() 211 (int) (clusterSize - (offset % clusterSize) - 1)); in readData() 216 offset += size; in readData() 243 public void writeData(long offset, ByteBuffer srcBuf) throws IOException { in writeData() argument 249 final long minSize = offset + len; in writeData() 256 int chainIdx = (int) (offset / clusterSize); in writeData() 257 if (offset % clusterSize != 0) { in writeData() [all …]
|
D | FsInfoSector.java | 47 private FsInfoSector(BlockDevice device, long offset) { in FsInfoSector() argument 48 super(device, offset, BootSector.SIZE); in FsInfoSector() 63 new FsInfoSector(bs.getDevice(), offset(bs)); in read() 80 final int offset = offset(bs); in create() local 82 if (offset == 0) throw new IOException( in create() 86 new FsInfoSector(bs.getDevice(), offset(bs)); in create() 93 private static int offset(Fat32BootSector bs) { in offset() method in FsInfoSector
|
/tools/dexter/slicer/ |
D | writer.cc | 102 SLICER_EXTRA(auto offset = data.size()); in WriteEncodedValue() 190 auto ptr = data.ptr<const dex::u1>(offset); in WriteEncodedValue() 191 auto size = data.size() - offset; in WriteEncodedValue() 227 dex::u4 offset = section.SectionOffset(); in CopySection() local 229 SLICER_CHECK_GE(offset, dex::Header::kV40Size); in CopySection() 230 SLICER_CHECK_LE(offset + size, image_size); in CopySection() 232 ::memcpy(image + offset, section.data(), size); in CopySection() 263 dex::u4 offset = 0; in CreateImage() local 267 offset += header_size; in CreateImage() 268 offset += dex_->string_ids.Init(offset, dex_ir_->strings.size()); in CreateImage() [all …]
|
D | code_ir.cc | 63 try_block_begin->offset = tryBlock.start_addr; in DisassembleTryBlocks() 67 try_block_end->offset = tryBlock.start_addr + tryBlock.insn_count; in DisassembleTryBlocks() 122 dbg_header->offset = 0; in DisassembleDebugInfo() 129 annotation->offset = 0; in DisassembleDebugInfo() 138 annotation->offset = 0; in DisassembleDebugInfo() 232 annotation->offset = address; in DisassembleDebugInfo() 247 dex::u4 offset = ptr - begin; in DisassembleBytecode() local 252 instr = DecodePackedSwitch(ptr, offset); in DisassembleBytecode() 256 instr = DecodeSparseSwitch(ptr, offset); in DisassembleBytecode() 260 instr = DecodeArrayData(ptr, offset); in DisassembleBytecode() [all …]
|
D | bytecode_encoder.cc | 129 bytecode->offset = offset_; in Visit() 215 if (label->offset != kInvalidOffset) { in Visit() 216 assert(label->offset <= offset_); in Visit() 217 A = label->offset - offset_; in Visit() 232 if (label->offset != kInvalidOffset) { in Visit() 234 assert(label->offset <= offset_); in Visit() 235 A = label->offset - offset_; in Visit() 250 if (label->offset != kInvalidOffset) { in Visit() 251 assert(label->offset <= offset_); in Visit() 252 B = label->offset - offset_; in Visit() [all …]
|
D | reader.cc | 91 return section<dex::MethodHandle>(mi->offset, mi->size); in MethodHandles() 321 ir::AnnotationsDirectory* Reader::ExtractAnnotations(dex::u4 offset) { in ExtractAnnotations() argument 322 if (offset == 0) { in ExtractAnnotations() 326 SLICER_CHECK_EQ(offset % 4, 0); in ExtractAnnotations() 329 auto& ir_annotations = annotations_directories_[offset]; in ExtractAnnotations() 333 auto dex_annotations = dataPtr<dex::AnnotationsDirectoryItem>(offset); in ExtractAnnotations() 355 ir::Annotation* Reader::ExtractAnnotationItem(dex::u4 offset) { in ExtractAnnotationItem() argument 356 SLICER_CHECK_NE(offset, 0); in ExtractAnnotationItem() 359 auto& ir_annotation = annotations_[offset]; in ExtractAnnotationItem() 361 auto dexAnnotationItem = dataPtr<dex::AnnotationItem>(offset); in ExtractAnnotationItem() [all …]
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/ |
D | ZipField.java | 66 protected final int offset; field in ZipField 93 ZipField(int offset, int size, @Nonnull String name, ZipFieldInvariant... invariants) { in ZipField() argument 94 Preconditions.checkArgument(offset >= 0, "offset >= 0"); in ZipField() 98 this.offset = offset; in ZipField() 112 ZipField(int offset, int size, long expected, @Nonnull String name) { in ZipField() argument 113 Preconditions.checkArgument(offset >= 0, "offset >= 0"); in ZipField() 117 this.offset = offset; in ZipField() 296 int offset() { in offset() method in ZipField 297 return offset; in offset() 307 return offset + size; in endOffset() [all …]
|
/tools/metalava/metalava-model-psi/src/main/java/com/android/tools/metalava/model/psi/ |
D | Javadoc.kt | 131 val offset = in mergeDocumentation() constant 137 return insertInto(doc, "@return $newText", offset) in mergeDocumentation() 140 val offset = in mergeDocumentation() constant 143 return insertInto(doc, newText, offset) in mergeDocumentation() 161 val offset = in mergeDocumentation() constant 168 return insertInto(doc, "$tagName $newText", offset) in mergeDocumentation() 171 val offset = in mergeDocumentation() constant 174 return insertInto(doc, newText, offset) in mergeDocumentation() 234 val offset = in insertInto() constant 248 val prefix = existingDoc.substring(0, offset) in insertInto() [all …]
|
/tools/dexter/slicer/export/slicer/ |
D | reader.h | 76 ir::AnnotationsDirectory* ExtractAnnotations(dex::u4 offset); 77 ir::Annotation* ExtractAnnotationItem(dex::u4 offset); 78 ir::AnnotationSet* ExtractAnnotationSet(dex::u4 offset); 79 ir::AnnotationSetRefList* ExtractAnnotationSetRefList(dex::u4 offset); 90 ir::EncodedArray* ExtractEncodedArray(dex::u4 offset); 98 ir::TypeList* ExtractTypeList(dex::u4 offset); 103 ir::DebugInfo* ExtractDebugInfo(dex::u4 offset); 104 ir::Code* ExtractCode(dex::u4 offset); 109 const T* ptr(int offset) const { in ptr() argument 110 SLICER_CHECK_GE(offset, 0 && offset + sizeof(T) <= size_); in ptr() [all …]
|
D | buffer.h | 75 T* ptr(size_t offset) { in ptr() argument 76 SLICER_CHECK_LE(offset + sizeof(T), size_); in ptr() 77 return reinterpret_cast<T*>(buff_ + offset); in ptr() 90 size_t offset = size_; in Alloc() local 92 std::memset(buff_ + offset, 0, size); in Alloc() 93 return offset; in Alloc() 97 size_t offset = size_; in Push() local 99 std::memcpy(buff_ + offset, ptr, size); in Push() 100 return offset; in Push()
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSourceTestBase.java | 223 String expectedContents, DataSource ds, long offset, int size) throws IOException { in assertSliceEquals() argument 224 DataSource slice = ds.slice(offset, size); in assertSliceEquals() 229 protected static void assertSliceThrowsIOOB(DataSource ds, long offset, int size) { in assertSliceThrowsIOOB() argument 231 ds.slice(offset, size); in assertSliceThrowsIOOB() 237 String expectedContents, DataSource ds, long offset, int size) throws IOException { in assertGetByteBufferEquals() argument 238 ByteBuffer buf = ds.getByteBuffer(offset, size); in assertGetByteBufferEquals() 245 protected static void assertGetByteBufferThrowsIOOB(DataSource ds, long offset, int size) in assertGetByteBufferThrowsIOOB() argument 248 ds.getByteBuffer(offset, size); in assertGetByteBufferThrowsIOOB() 254 String expectedFedContents, DataSource ds, long offset, int size) throws IOException { in assertFeedEquals() argument 256 ds.feed(offset, size, out); in assertFeedEquals() [all …]
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ByteArrayUtil.java | 44 byte[] bytes, int offset, int length, int containerSize) { in getByteBuffer() argument 47 data[i] = bytes[offset + 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()
|
/tools/test/connectivity/acts_tests/tests/google/gnss/ |
D | GnssBlankingThTest.py | 47 self.offset = self.gsm_sweep_params[2] 57 self.offset = self.gsm_sweep_params[2] 67 self.offset = self.gsm_sweep_params[2] 77 self.offset = self.gsm_sweep_params[2] 87 self.offset = self.lte_tdd_pc3_sweep_params[2] 97 self.offset = self.lte_tdd_pc3_sweep_params[2] 107 self.offset = self.lte_tdd_pc3_sweep_params[2] 117 self.offset = self.lte_tdd_pc3_sweep_params[2] 127 self.offset = self.lte_tdd_pc3_sweep_params[2] 137 self.offset = self.lte_tdd_pc3_sweep_params[2] [all …]
|
/tools/test/connectivity/acts/framework/acts/controllers/fuchsia_lib/bt/ |
D | gattc_lib.py | 91 def writeCharById(self, id, offset, write_value): argument 105 "offset": offset, 111 def writeLongCharById(self, id, offset, write_value, reliable_mode=False): argument 126 "offset": offset, 133 def writeLongDescById(self, id, offset, write_value): argument 147 "offset": offset, 252 def readLongDescriptorById(self, id, offset, max_bytes): argument 266 "offset": offset, 272 def writeDescriptorById(self, id, offset, write_value): argument 290 def readLongCharacteristicById(self, id, offset, max_bytes): argument [all …]
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zfile/ |
D | ApkAlignmentTest.java | 70 long offset = in soFilesUncompressedAndAligned() local 72 assertTrue(offset % 4096 == 0); in soFilesUncompressedAndAligned() 91 long offset = in soFilesMergedFromZipsCanBeUncompressedAndAligned() local 93 assertFalse(offset % 4096 == 0); in soFilesMergedFromZipsCanBeUncompressedAndAligned() 123 long offset = in soFilesMergedFromZipsCanBeUncompressedAndAligned() local 125 assertTrue(offset % 4096 == 0); in soFilesMergedFromZipsCanBeUncompressedAndAligned() 167 long offset = in soFilesUncompressedAndNotAligned() local 169 assertTrue(offset % 4096 != 0); in soFilesUncompressedAndNotAligned() 188 long offset = in soFilesMergedFromZipsCanBeUncompressedAndNotAligned() local 190 assertFalse(offset % 4096 == 0); in soFilesMergedFromZipsCanBeUncompressedAndNotAligned() [all …]
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/zip/ |
D | EndCentralDirectoryInfo.java | 159 int offset = (int) size - CENTRAL_DIRECTORY_MAGIC_LENGTH - 1; in getEndCentralDirectoryInfo() local 161 while (offset >= 0) { in getEndCentralDirectoryInfo() 164 Arrays.copyOfRange(endCentralDir, offset, offset + 4))) { in getEndCentralDirectoryInfo() 165 offset--; in getEndCentralDirectoryInfo() 170 if (offset < 0) { in getEndCentralDirectoryInfo() 175 return Arrays.copyOfRange(endCentralDir, offset, offset + 64); in getEndCentralDirectoryInfo()
|
/tools/apksig/src/test/java/com/android/apksig/internal/util/ |
D | FileChannelDataSourceTest.java | 63 int offset = 23456; in testFeedsCorrectData_whenFilePartiallyReadWithOffset() local 65 rafDataSource.feed(offset, bytesToFeed, dataSink); in testFeedsCorrectData_whenFilePartiallyReadWithOffset() 67 byte[] expectedBytes = Arrays.copyOfRange(fullFileContent, offset, offset + bytesToFeed); in testFeedsCorrectData_whenFilePartiallyReadWithOffset() 82 int offset = 23456; in testFeedsCorrectData_whenSeveralMbRead() local 84 rafDataSource.feed(offset, bytesToFeed, dataSink); in testFeedsCorrectData_whenSeveralMbRead() 86 byte[] expectedBytes = Arrays.copyOfRange(fullFileContent, offset, offset + bytesToFeed); in testFeedsCorrectData_whenSeveralMbRead()
|