resource = versionedFile.getVersionHistory().getVersion(version);
istream = ((VersionResource)resource).getContentAsStream();
}
else
{
resource = new FileResource(uri, node, nsContext);
istream = ((FileResource)resource).getContentAsStream();
}
HierarchicalProperty lastModifiedProperty = resource.getProperty(FileResource.GETLASTMODIFIED);
// check before any other reads