if (outputConfig.isOverrideExistingResources()) {
StringInputStream newContent = getInputStream(contentsAsString, encoding);
if (hasContentsChanged(file, newContent)) {
// reset to offset zero allows to reuse internal byte[]
// no need to convert the string twice
newContent.reset();
file.setContents(newContent, true, true, monitor);
} else {
file.touch(getMonitor());
}
if (file.isDerived() != outputConfig.isSetDerivedProperty()) {