chaokunyang commented on issue #2302:
URL: https://github.com/apache/fory/issues/2302#issuecomment-2963128998
`Collection<BufferObject> bufferObjects = new ArrayList<>();` those are
binary buffers, you need to write them by yourself, and construct these buffer
when deserialization.
BufferObject has following def:
```java
public interface BufferObject {
int totalBytes();
/**
* Write serialized object to buffer. Note: The caller should try to
ensure `buffer.writerIndex`
* is aligned, otherwise the memory copy will be inefficient.
*/
void writeTo(MemoryBuffer buffer);
/** Write serialized data as Buffer. */
MemoryBuffer toBuffer();
}
```
You can use `BufferObject#writeTo` to write it into your writer.
We want to add `writeTo(OutputStream)` and
`writeTo(java.nio.channels.WritableByteChannel)` to harness this feature, but
currently we don't have time for this. Contribution are welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]