Skip to content

Instantly share code, notes, and snippets.

@saulovenancio
Created March 19, 2014 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saulovenancio/9644393 to your computer and use it in GitHub Desktop.
Save saulovenancio/9644393 to your computer and use it in GitHub Desktop.
get file inside JCR information and stream
Node fileNode = // find this somehow
Node jcrContent = fileNode.getNode("jcr:content");
String fileName = fileNode.getName();
InputStream content = jcrContent.getProperty("jcr:data").getStream();
InputStream content = jcrContent.getProperty("jcr:data").getBinary().getStream();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment