jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cech. Ulrich" <Ulrich.C...@aeb.de>
Subject AW: Learning Jackrabbit - Extracted files are length zero
Date Mon, 22 Apr 2013 15:41:47 GMT
< resNode.setProperty("jcr:data", new FileInputStream(file));>

I think, the problem lies here in the importFile() method:
Try out this one:
resNode.setProperty(JcrConstants.JCR_DATA, resNode.getSession().getValueFactory().createBinary(input));

important: "input" is an InputStream to the file, you want to import

View raw message