Need more random access related methods
- Dominant language
- Java
- Stars
- 44
- Forks
- 15
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 12
Description
This is a follow-up to https://github.com/hashgraph/pbj/issues/790. That ticket (and related PRs) added some methods to BufferedData, but they are not enough for real world scenarios to write data to RandomAccessData (in particular, to write objects to files in MerkleDb using mapped byte buffers / memory segments).
A few methods to add:
* `Bytes.putTo(RandomAccessData, offset)` - to write Bytes at a given offset, similar to existing `Bytes.writeTo(WritableSequentialData)`
* `BufferedData.putTo(RandomAccessData, offset)` - similar to Bytes
* `RandomAccessData.putBytes(offset, ByteBuffer)` - similar to existing `RandomAccessData.putBytes(offset, byte[])`, needed to implement the above
* `ProtoWriterTools.putTag(RandomAccessData, offset, field)` - similar to existing `ProtoWriterTools.writeTag(WritableSequentialData)`, not strictly needed, but handy
Contributor guide
Assessment
This issue has not been assessed yet.