/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/zip/ |
D | RandomAccessFileZipDataInput.java | 43 public RandomAccessFileZipDataInput(RandomAccessFile file, long offset, long size) { in RandomAccessFileZipDataInput() argument 44 if (offset < 0) { in RandomAccessFileZipDataInput() 45 throw new IndexOutOfBoundsException("offset: " + offset); in RandomAccessFileZipDataInput() 52 this.startIndex = offset; in RandomAccessFileZipDataInput() 69 public void copyTo(long offset, long size, ZipDataOutput output) throws IOException { in copyTo() argument 71 checkBoundValid(offset, size, srcSize); in copyTo() 75 long offsetInFile = startIndex + offset; in copyTo() 92 public void copyTo(long offset, int size, ByteBuffer buffer) throws IOException { in copyTo() argument 94 checkBoundValid(offset, size, srcSize); in copyTo() 101 long offsetInFile = startIndex + offset; in copyTo() [all …]
|
D | ByteBufferZipDataInput.java | 45 public void copyTo(long offset, long size, ZipDataOutput output) throws IOException { in copyTo() argument 49 output.write(createByteBuffer(offset, (int) size)); in copyTo() 53 public void copyTo(long offset, int size, ByteBuffer buffer) throws IOException { in copyTo() argument 54 buffer.put(createByteBuffer(offset, size)); in copyTo() 58 public ByteBuffer createByteBuffer(long offset, int size) { in createByteBuffer() argument 59 checkChunkValid(offset, size); in createByteBuffer() 60 int position = (int) offset; in createByteBuffer() 71 public ZipDataInput slice(long offset, long size) { in slice() argument 72 if (offset == 0 && size == sourceSize) { in slice() 78 ByteBuffer byteBuffer = createByteBuffer(offset, (int) size); in slice() [all …]
|
D | RandomAccessFileZipDataOutput.java | 50 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument 51 if (offset < 0) { in write() 52 throw new IndexOutOfBoundsException("offset: " + offset); in write() 54 if (offset > buffer.length) { in write() 55 …throw new IndexOutOfBoundsException("offset (" + offset + ") > buffer length(" + buffer.length + "… in write() 62 file.write(buffer, offset, length); in write()
|
D | EndOfCentralDirectory.java | 81 private long offset; field in EndOfCentralDirectory 112 public static Optional<EndOfCentralDirectory> getEOCDByBytes(byte[] bytes, int offset) { in getEOCDByBytes() argument 114 int remainingDataLen = bytes.length - offset; in getEOCDByBytes() 118 ByteBuffer bf = ByteBuffer.wrap(bytes, offset, remainingDataLen); in getEOCDByBytes() 158 UnsignedDecimalUtil.setUnsignedInt(bf, offset); in toBytes() 215 return offset; in getOffset() 218 public void setOffset(long offset) { in setOffset() argument 219 this.offset = offset; in setOffset()
|
D | ZipDataInput.java | 42 void copyTo(long offset, long size, ZipDataOutput output) throws IOException; in copyTo() argument 52 void copyTo(long offset, int size, ByteBuffer buffer) throws IOException; in copyTo() argument 62 ByteBuffer createByteBuffer(long offset, int size) throws IOException; in createByteBuffer() argument 70 ZipDataInput slice(long offset, long size); in slice() argument
|
D | Zip.java | 140 int offset = 0; in getZipCentralDirectory() local 142 while (offset < cdBytes.length) { in getZipCentralDirectory() 147 offset += cd.getLength(); in getZipCentralDirectory() 149 if (offset + cDOffset != eOCDOffset) { in getZipCentralDirectory() 169 long offset = cd.getOffset(); in getZipEntries() local 174 ZipEntryData zipEntryData = ZipEntryData.getZipEntry(file, offset, fileSize); in getZipEntries() 175 if (cDOffset - offset < zipEntryData.getLength()) { in getZipEntries() 292 long offset = 0L; in resetOffset() local 295 entry.getCentralDirectory().setOffset(offset); in resetOffset() 296 offset += entry.getZipEntryData().getLength(); in resetOffset() [all …]
|
D | ZipUtils.java | 135 public static void setCentralDirectoryOffset(ByteBuffer eocd, long offset) { in setCentralDirectoryOffset() argument 137 setUInt32ToBuffer(eocd, eocd.position() + ZIP_CENTRAL_DIR_OFFSET_IN_EOCD, offset); in setCentralDirectoryOffset() 169 static int getUInt16FromBuffer(ByteBuffer buffer, int offset) { in getUInt16FromBuffer() argument 170 return buffer.getShort(offset) & 0xffff; in getUInt16FromBuffer() 173 static long getUInt32FromBuffer(ByteBuffer buffer, int offset) { in getUInt32FromBuffer() argument 174 return buffer.getInt(offset) & UINT32_MAX_VALUE; in getUInt32FromBuffer() 177 private static void setUInt32ToBuffer(ByteBuffer buffer, int offset, long value) { in setUInt32ToBuffer() argument 181 buffer.putInt(buffer.position() + offset, (int) value); in setUInt32ToBuffer()
|
D | ZipEntryData.java | 66 long offset = entryOffset; in getZipEntry() local 70 offset += ZipEntryHeader.HEADER_LENGTH; in getZipEntry() 76 offset += entryHeader.getFileNameLength(); in getZipEntry() 82 offset += entryHeader.getExtraLength(); in getZipEntry() 87 entry.setFileOffset(offset); in getZipEntry()
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/entity/ |
D | HwBlockHead.java | 70 public static byte[] getBlockHead(char type, char tag, short length, int offset) { in getBlockHead() argument 76 (byte) ((offset >> TRIPLE_BIT_SIZE) & 0xff), in getBlockHead() 77 (byte) ((offset >> DOUBLE_BIT_SIZE) & 0xff), in getBlockHead() 78 (byte) ((offset >> BIT_SIZE) & 0xff), in getBlockHead() 79 (byte) (offset & 0xff) in getBlockHead() 92 public static byte[] getBlockHeadLittleEndian(char type, char tag, int length, int offset) { in getBlockHeadLittleEndian() argument 97 bf.putInt(offset); in getBlockHeadLittleEndian()
|
D | SigningBlock.java | 28 private int offset; field in SigningBlock 50 public SigningBlock(int type, byte[] value, int offset) { in SigningBlock() argument 55 this.offset = offset; in SigningBlock() 71 return offset; in getOffset()
|
/developtools/smartperf_host/ide/src/hdc/common/ |
D | Serialize.ts | 85 let offset = 0; 87 offset += fileSizeValue.length; 88 mergedArray.set(atimeValue, offset); 89 offset += atimeValue.length; 90 mergedArray.set(mtimeValue, offset); 91 offset += mtimeValue.length; 92 mergedArray.set(optionsValue, offset); 93 offset += optionsValue.length; 94 mergedArray.set(pathValue, offset); 95 offset += pathValue.length; [all …]
|
/developtools/profiler/host/smartperf/ide/src/hdc/common/ |
D | Serialize.ts | 85 let offset = 0; 87 offset += fileSizeValue.length; 88 mergedArray.set(atimeValue, offset); 89 offset += atimeValue.length; 90 mergedArray.set(mtimeValue, offset); 91 offset += mtimeValue.length; 92 mergedArray.set(optionsValue, offset); 93 offset += optionsValue.length; 94 mergedArray.set(pathValue, offset); 95 offset += pathValue.length; [all …]
|
/developtools/profiler/device/plugins/ftrace_plugin/test/unittest/ |
D | ftrace_field_parser_test.cpp | 37 size_t offset = buffer_.size(); in AppendInt() local 39 if (memcpy_s(&buffer_[offset], buffer_.capacity() - offset, &value, sizeof(value))) { in AppendInt() 44 format.offset = offset; in AppendInt() 53 size_t offset = buffer_.size(); in AppendString() local 55 if (memcpy_s(&buffer_[offset], buffer_.capacity() - offset, &str[0], str.size())) { in AppendString() 60 format.offset = offset; in AppendString()
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/ |
D | SignHap.java | 87 long offset = INIT_OFFSET_LEN; in copyFiles() local 101 offset += JarFile.LOCHDR; in copyFiles() 104 offset += outEntry.getName().length(); in copyFiles() 107 if (alignment > 0 && (offset % alignment != 0)) { in copyFiles() 108 int needed = alignment - (int) (offset % alignment); in copyFiles() 110 offset += needed; in copyFiles() 114 offset = writeOutputStreamAndGetOffset(in, out, inEntry, offset); in copyFiles() 125 offset += JarFile.LOCHDR; in copyFiles() 126 JarEntry outEntry = getFirstJarEntry(firstEntry, offset, timestamp); in copyFiles() 159 private static JarEntry getFirstJarEntry(JarEntry firstEntry, long offset, long timestamp) { in getFirstJarEntry() argument [all …]
|
D | SignBin.java | 108 long offset = binFileLen + HwBlockHead.getBlockLen() + HwBlockHead.getBlockLen(); in writeBlockDataToFile() local 109 if (isLongOverflowInteger(offset)) { in writeBlockDataToFile() 110 … LOGGER.error("The profile block head offset is overflow interger range, offset: " + offset); in writeBlockDataToFile() 115 …BlockHead.getBlockHead(isSigned, SignatureBlockTags.DEFAULT, (short) profileDataLen, (int) offset); in writeBlockDataToFile() 117 offset += profileDataLen; in writeBlockDataToFile() 118 if (isLongOverflowInteger(offset)) { in writeBlockDataToFile() 119 … LOGGER.error("The sign block head offset is overflow integer range, offset: " + offset); in writeBlockDataToFile() 123 … SignatureBlockTypes.SIGNATURE_BLOCK, SignatureBlockTags.DEFAULT, (short) 0, (int) offset); in writeBlockDataToFile()
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/ |
D | FileUtils.java | 148 …public static byte[] readFileByOffsetAndLength(File file, long offset, long length) throws IOExcep… in readFileByOffsetAndLength() argument 150 return readInputByOffsetAndLength(input, offset, length); in readFileByOffsetAndLength() 163 …public static byte[] readInputByOffsetAndLength(InputStream input, long offset, long length) throw… in readInputByOffsetAndLength() argument 164 input.skip(offset); in readInputByOffsetAndLength() 226 …oolean appendWriteFileByOffsetToFile(String inFile, FileOutputStream out, long offset, long size) { in appendWriteFileByOffsetToFile() argument 229 fis.skip(offset); in appendWriteFileByOffsetToFile() 433 int offset = 0; in toByteArray() local 436 while (offset < size && (read = input.read(data, offset, size - offset)) != FILE_END) { in toByteArray() 437 offset += read; in toByteArray() 440 if (offset != size) { in toByteArray() [all …]
|
/developtools/profiler/device/plugins/native_hook/src/ |
D | runtime_stack_range.cpp | 113 int offset = 0; in GetAnUnlimitedLine() local 116 if (offset + length >= static_cast<int>(buf.size())) { in GetAnUnlimitedLine() 119 retLine = fgets(&buf[0] + offset, buf.size() - offset, fp); in GetAnUnlimitedLine() 123 length = static_cast<int>(strlen(&buf[0] + offset)); in GetAnUnlimitedLine() 124 if (offset + length - 1 >= 0 && buf[offset + length - 1] == '\n') { in GetAnUnlimitedLine() 127 offset += length; in GetAnUnlimitedLine()
|
/developtools/hiperf/src/ |
D | perf_file_writer.cpp | 62 attrSection_.offset = 0; in Open() 152 if (fseek(fp_, dataSection_.offset, SEEK_SET) != 0) { in ReadDataSection() 156 HLOGD("dataSection_ at offset %" PRIu64 " + %" PRIu64 "", dataSection_.offset, in ReadDataSection() 227 off_t offset = ftello(fp_); in GetFilePos() local 228 if (offset == -1) { in GetFilePos() 232 pos = static_cast<uint64_t>(offset); in GetFilePos() 286 fileAttr.ids.offset = idSectionOffset; in WriteAttrAndId() 300 attrSection_.offset = attrSectionOffset; in WriteAttrAndId() 302 dataSection_.offset = dataSectionOffset; in WriteAttrAndId() 326 header_.eventTypes.offset = 0; in WriteHeader() [all …]
|
/developtools/global_resource_tool/src/ |
D | resource_append.cpp | 515 int32_t offset = 0; in LoadResourceItemFromMem() local 518 string nameStr = ParseString(buffer, length, offset); in LoadResourceItemFromMem() 520 string limitKeyStr = ParseString(buffer, length, offset); in LoadResourceItemFromMem() 522 string filePathStr = ParseString(buffer, length, offset); in LoadResourceItemFromMem() 524 int32_t type = ParseInt32(buffer, length, offset); in LoadResourceItemFromMem() 527 int32_t keyParamSize = ParseInt32(buffer, length, offset); in LoadResourceItemFromMem() 531 keyParam.keyType = static_cast<KeyType>(ParseInt32(buffer, length, offset)); in LoadResourceItemFromMem() 532 keyParam.value = ParseInt32(buffer, length, offset); in LoadResourceItemFromMem() 536 string data = ParseString(buffer, length, offset); in LoadResourceItemFromMem() 563 } while (offset < length); in LoadResourceItemFromMem() [all …]
|
D | file_entry.cpp | 264 string::size_type offset = 0; in GetSegments() local 265 string::size_type pos = filePath_.find_first_of(SEPARATE.front(), offset); in GetSegments() 267 segments.push_back(filePath_.substr(offset, pos - offset)); in GetSegments() 268 offset = pos + 1; in GetSegments() 269 pos = filePath_.find_first_of(SEPARATE.front(), offset); in GetSegments() 272 if (offset < filePath_.length()) { in GetSegments() 273 segments.push_back(filePath_.substr(offset)); in GetSegments() 320 bool FileEntry::CreateDirsInner(const string &path, string::size_type offset) in CreateDirsInner() argument 322 string::size_type pos = path.find_first_of(SEPARATE.front(), offset); in CreateDirsInner()
|
/developtools/profiler/device/plugins/native_daemon/include/ |
D | mem_map_item.h | 26 …MemMaps(uint64_t begin, uint64_t end, uint64_t offset, uint32_t type, uint32_t filePathId, const s… in MemMaps() argument 29 maps_.emplace_back(begin, end, static_cast<uint16_t>(type), offset, name_); in MemMaps() 40 …MemMapItem(uint64_t begin, uint64_t end, uint16_t type, uint64_t offset, std::string_view nameHold) in MemMapItem() argument 41 : begin_(begin), end_(end), type_(type), pageoffset_(offset), nameHold_(nameHold) {} in MemMapItem() 76 MemMapItem(uint64_t begin, uint64_t end, uint64_t offset, const std::string &name) in MemMapItem() argument 77 : begin_(begin), end_(end), pageoffset_(offset), name_(name), in MemMapItem()
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/verify/ |
D | VerifyElf.java | 250 int offset = bytes.length - HwSignHead.SIGN_HEAD_LEN; in getElfSignBlockData() local 251 byte[] magicByte = readByteArrayOffset(bytes, offset, HwSignHead.ELF_MAGIC.length); in getElfSignBlockData() 252 offset += HwSignHead.ELF_MAGIC.length; in getElfSignBlockData() 253 byte[] versionByte = readByteArrayOffset(bytes, offset, HwSignHead.VERSION.length); in getElfSignBlockData() 254 offset += HwSignHead.VERSION.length; in getElfSignBlockData() 266 byte[] blockSizeByte = readByteArrayOffset(bytes, offset, intByteLength); in getElfSignBlockData() 267 offset += intByteLength; in getElfSignBlockData() 268 byte[] blockNumByte = readByteArrayOffset(bytes, offset, intByteLength); in getElfSignBlockData() 280 int offset = elfBlockData.getBlockStart(); in getSignBlock() local 284 byte[] blockByte = readByteArrayOffset(bytes, offset, HwBlockHead.ELF_BLOCK_LEN); in getSignBlock() [all …]
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/ |
D | MerkleTreeBuilder.java | 100 int offset = 0; in transInputStreamToHashData() local 104 offset += num; in transInputStreamToHashData() 105 len = Math.min(CHUNK_SIZE, readSize - offset); in transInputStreamToHashData() 106 if (len <= 0 || offset == readSize) { in transInputStreamToHashData() 110 if (offset != readSize) { in transInputStreamToHashData() 181 int offset = 0; in runHashTask() 184 while (offset < bufferSize) { in runHashTask() 185 ByteBuffer chunk = slice(buffer, offset, offset + CHUNK_SIZE); in runHashTask() 193 offset += CHUNK_SIZE; in runHashTask()
|
/developtools/profiler/hiebpf/test/unittest/ |
D | bpf_controller_test.cpp | 81 off_t offset = 0; variable 83 pwrite(fd, buf, sizeof(buf), offset); 85 pread(fd, buf, sizeof(buf), offset); 86 offset += sizeof(buf);
|
/developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/components/ |
D | ComponentBase.ets | 29 * the offset in pixels this component has on the x-axis 34 * the offset in pixels this component has on the Y-axis 59 * Returns the used offset on the x-axis for drawing the axis or legend 60 * labels. This offset is applied before and after the label. 69 * Sets the used x-axis offset for the labels on this axis. 78 * Returns the used offset on the x-axis for drawing the axis labels. This 79 * offset is applied before and after the label. 88 * Sets the used y-axis offset for the labels on this axis. For the legend, 89 * higher offset means the legend as a whole will be placed further away
|