Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 205) sorted by relevance

123456789

/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/zip/
DRandomAccessFileZipDataInput.java43 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 …]
DByteBufferZipDataInput.java45 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 …]
DRandomAccessFileZipDataOutput.java50 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()
DEndOfCentralDirectory.java81 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()
DZipDataInput.java42 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
DZip.java140 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 …]
DZipUtils.java135 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()
DZipEntryData.java66 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/
DHwBlockHead.java70 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()
DSigningBlock.java28 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/
DSerialize.ts85 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/smartperf_host/trace_streamer/test/unittest/rawtrace/
Dftrace_field_processor_test.cpp36 size_t offset = fieldBuffer_.size(); in AppendIntFiled() local
38 … if (memcpy_s(&fieldBuffer_[offset], fieldBuffer_.capacity() - offset, &value, sizeof(value))) { in AppendIntFiled()
43 fieldFormat.offset = offset; in AppendIntFiled()
52 size_t offset = fieldBuffer_.size(); in AppendString() local
54 … if (memcpy_s(&fieldBuffer_[offset], fieldBuffer_.capacity() - offset, &str[0], str.size())) { in AppendString()
59 fieldFormat.offset = offset; in AppendString()
/developtools/profiler/device/plugins/ftrace_plugin/test/unittest/
Dftrace_field_parser_test.cpp37 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/profiler/device/services/shared_memory/test/unittest/
Dshared_memory_block_test.cpp378 uint32_t offset = 0; variable
380 auto ret = shareMemoryBlock.GetMemory(fieldSize, &memory, &offset);
383 EXPECT_EQ(offset, 0);
386 offset = 0;
387 ret = shareMemoryBlock.GetMemory(NUM_FOUR, &memory, &offset);
390 EXPECT_EQ(offset, NUM_FOUR);
415 uint32_t offset = 0; variable
417 ret = shareMemoryBlock.GetMemory(len, &memory, &offset);
420 EXPECT_EQ(offset, NUM_FOUR);
435 offset = 0;
[all …]
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/sign/
DSignHap.java84 long offset = INIT_OFFSET_LEN; in copyFiles() local
98 offset += JarFile.LOCHDR; in copyFiles()
101 offset += outEntry.getName().length(); in copyFiles()
104 if (alignment > 0 && (offset % alignment != 0)) { in copyFiles()
105 int needed = alignment - (int) (offset % alignment); in copyFiles()
107 offset += needed; in copyFiles()
111 offset = writeOutputStreamAndGetOffset(in, out, inEntry, offset); in copyFiles()
122 offset += JarFile.LOCHDR; in copyFiles()
123 JarEntry outEntry = getFirstJarEntry(firstEntry, offset, timestamp); in copyFiles()
156 private static JarEntry getFirstJarEntry(JarEntry firstEntry, long offset, long timestamp) { in getFirstJarEntry() argument
[all …]
DSignBin.java108 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/
DFileUtils.java148 …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/hiperf/src/
Dvirtual_thread.cpp125 std::shared_ptr<DfxMap> VirtualThread::FindMapByFileInfo(const std::string name, uint64_t offset) c… in FindMapByFileInfo()
132 if (offset >= map->offset && (offset - map->offset) < (map->end - map->begin)) { in FindMapByFileInfo()
135 offset, map->begin, map->end, map->offset, map->name.c_str()); in FindMapByFileInfo()
139 HLOGM("NOT found offset 0x%" PRIx64 " in maps %zu ", offset, memMaps_.size()); in FindMapByFileInfo()
214 uint64_t foff = vaddr - map->begin + map->offset - map->elf->GetBaseOffset(); in ReadRoMemory()
290 uint64_t begin, end, offset; in ParseDevhostMap() local
313 offset = std::stoull(mapTokens[MMAP_LINE_TOKEN_INDEX_OFFSET], in ParseDevhostMap()
343 CreateMapItem(filename, begin, end - begin, offset); in ParseDevhostMap()
367 uint64_t offset) in CreateMapItem() argument
372 …shared_ptr<DfxMap> map = memMaps_.emplace_back(std::make_shared<DfxMap>(begin, begin + len, offset, in CreateMapItem()
[all …]
Dperf_file_writer.cpp62 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()
228 off_t offset = ftello(fp_); in GetFilePos() local
229 if (offset == -1) { in GetFilePos()
233 pos = static_cast<uint64_t>(offset); in GetFilePos()
287 fileAttr.ids.offset = idSectionOffset; in WriteAttrAndId()
301 attrSection_.offset = attrSectionOffset; in WriteAttrAndId()
303 dataSection_.offset = dataSectionOffset; in WriteAttrAndId()
327 header_.eventTypes.offset = 0; in WriteHeader()
[all …]
/developtools/global_resource_tool/src/
Dresource_append.cpp521 int32_t offset = 0; in LoadResourceItemFromMem() local
524 string nameStr = ParseString(buffer, length, offset); in LoadResourceItemFromMem()
526 string limitKeyStr = ParseString(buffer, length, offset); in LoadResourceItemFromMem()
528 string filePathStr = ParseString(buffer, length, offset); in LoadResourceItemFromMem()
530 int32_t type = ParseInt32(buffer, length, offset); in LoadResourceItemFromMem()
533 int32_t keyParamSize = ParseInt32(buffer, length, offset); in LoadResourceItemFromMem()
537 keyParam.keyType = static_cast<KeyType>(ParseInt32(buffer, length, offset)); in LoadResourceItemFromMem()
538 keyParam.value = ParseInt32(buffer, length, offset); in LoadResourceItemFromMem()
545 string data = ParseString(buffer, length, offset); in LoadResourceItemFromMem()
572 } while (offset < length); in LoadResourceItemFromMem()
[all …]
Dfile_entry.cpp264 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/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/hap/verify/
DVerifyElf.java250 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/smartperf_host/ide/src/trace/database/
DTraceWorker.ts119 let offset = 0;
121 mergedArray.set(item, offset);
122 offset += item.length;
378 let offset = 12; variable
380 let headArray = uint8Array.slice(0, offset);
382 while (offset < uint8Array.length) {
384 startOffset: offset,
385 endOffset: offset,
387 let dataTypeData = e.data.buffer.slice(offset, offset + tlvTypeLength);
388 offset += tlvTypeLength;
[all …]
DLongTraceDBUtils.ts50 …, fileType: string, timStamp: number, pageNumber: number, index: number, offset: number, sliceLen:…
56 startOffset: offset,
57 endOffset: offset + sliceLen,
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/
DMerkleTreeBuilder.java100 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()

123456789