I have the following doubt.

In the code bellow:
                        Node fileNode = parentnode.addNode(file.getName(), 
"nt:file");
                        Node resNode = fileNode.addNode("jcr:content", 
"nt:resource");
                        resNode.setProperty("jcr:mimeType", mimeType);
                        resNode.setProperty("jcr:encoding", "");
                        ..............;
Can I set the properties directly for fileNode, instead have to create another 
node of nodetype nt:resource? Like this:
                        Node fileNode = parentnode.addNode(file.getName(), 
"nt:file");
                        fileNode.setProperty("jcr:mimeType", mimeType);
                        fileNode.setProperty("jcr:encoding", "");
                        resNode.setProperty("jcr:data", new 
FileInputStream(file));
                        .....;

What consequences, considerations, about the two kind of implementation?
Thanks;
Helio.


Reply via email to