Hi,

On Tue, Feb 18, 2014 at 4:41 AM, Chetan Mehrotra
<[email protected]> wrote:
> That mode is fine for case like FileInputStream but not for case like
> S3 where underlying data is just a url and DataStore needs to make use
> of that.

Something like S3InputStream.getURL() should work just fine for that use case:

    if (stream instanceof S3InputStream) {
        URL url = ((S3InputStream) stream).getURL();
        ...; // create binary with S3 copy
    }

The  benefit of using InputStream instead of Binary for this case is
that the InputStream gets passed through the whole stack to the
underlying data store, whereas the Binary interface as a JCR construct
is interpreted higher up in oak-jcr.

BR,

Jukka Zitting

Reply via email to