use of com.devonfw.cobigen.api.externalprocess.to.MergeTo in project cobigen by devonfw.
the class ExternalServerMergerProxy method merge.
@Override
public String merge(File base, String patch, String targetCharset) throws MergeException {
String baseFileContents;
try {
baseFileContents = new String(Files.readAllBytes(base.toPath()), Charset.forName(targetCharset));
} catch (IOException e) {
throw new MergeException(base, "Could not read base file!", e);
}
MergeTo mergeTo = new MergeTo(baseFileContents, patch, this.patchOverrides);
return this.externalProcess.postJsonRequest("merge", mergeTo);
}
Aggregations