Using sling resource interface I am trying to get access the data saved as a binary property to my JCR node. Currently I am doing it in the following ways , which is returning me a null value.
Resource dataResource = resourceResolver.getResource("/testNode/A/test.txt");
ValueMap properties = dataResource.adaptTo(ValueMap.class);
String expected = properties.get("jcr:data").toString(); // null
InputStream content = (InputStream) actualProp.get("jcr:data"); // null
Can anyone let me know what is missing , or what is the best way to read the jcr:data property , which is present as a binary data. The dataResource is a nt:unstructured one.
the output it shows is :- org.apache.sling.jcr.resource.internal.helper.LazyInputStream@4f4c8085