Improve files management in JCR.
[lgpl/argeo-commons.git] / org.argeo.jcr / src / org / argeo / jcr / fs / BinaryChannel.java
index a5036fb5e95b8390b39cdeea1cd1da37d19be6b5..658fe93302981f309fc1e8483ea5bc6b8fe4cda5 100644 (file)
@@ -37,7 +37,7 @@ public class BinaryChannel implements SeekableByteChannel {
                                Node data = file.getNode(Property.JCR_CONTENT);
                                this.binary = data.getProperty(Property.JCR_DATA).getBinary();
                        } else {
-                               Node data = file.addNode(Property.JCR_CONTENT, NodeType.NT_RESOURCE);
+                               Node data = file.addNode(Property.JCR_CONTENT, NodeType.NT_UNSTRUCTURED);
                                try (InputStream in = new ByteArrayInputStream(new byte[0])) {
                                        this.binary = data.getSession().getValueFactory().createBinary(in);
                                }