if (ResourceUtil.isFile(node))
{
if (version != null)
{
VersionedResource versionedFile = new VersionedFileResource(uri, node, nsContext);
resource = versionedFile.getVersionHistory().getVersion(version);
istream = ((VersionResource)resource).getContentAsStream();
}
else
{
resource = new FileResource(uri, node, nsContext);