Hi,

On 7 September 2016 at 12:26, Marcel Reutegger <mreut...@adobe.com> wrote:

> On 07/09/16 12:23, Julian Reschke wrote:
>
>> Maybe we could have a Oak specific InputStream implementation that wraps
>> a series of existing Binary implementations, and which Oak, when writing
>> a new binary, could leverage? (by not actually reading the binaries, but
>> just copying references around...)
>>
>
> or introduce a new Binary class that wraps existing Binary objects...
>

List<Binary> binaryList = new ArrayList<>();
populateBinaryList(binaryList, "jcr:data", listOfResources);
node.setProperty("jcr:data", new WrappedBinary(binaryList));

where WrappedBinary implements JCR Binary and is something Oak understands
how to deal with efficiently.

I think that works for me.
I will need to make some changes to the Sling Resource API as I am binding
to that and talking in terms of InputStreams rather than Binary objects.

Best Regards
Ian





>
> Regards
>  Marcel
>

Reply via email to