


I am trying to read a "binary" type property value with below code.
resourceToRead.getValueMap().get("allFundsDup", Property.class).getBinary();
Here is the error I am getting.
result = {BinaryImpl@30400} Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate org.apache.jackrabbit.oak.plugins.value.jcr.BinaryImpl.toString()
value = {ValueImpl@30402} Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl.toString()
If I evaluate below code, it returns original stream.
resourceToRead.getValueMap().get("allFundsDup", Property.class).getBinary().getStream();
what I don't understand is if stream is retrievable , why does first snippet not retrieving Binary object and giving an exception.
also when I try getValueMap().get("allFundsDup", Binary.class) same exception occurs.
Any inputs to understand above code.
Thanks,
Sri
Views
Replies
Sign in to like this content
Total Likes
Can you try the following way to return the data stream,
InputStream inputStream = ResourceUtil.getValueMap(resourceToRead).get("allFundsDup", InputStream .class);
Thanks,
Ashwin Raju
Can you try the following way to return the data stream,
InputStream inputStream = ResourceUtil.getValueMap(resourceToRead).get("allFundsDup", InputStream .class);
Thanks,
Ashwin Raju