Release new version

This commit is contained in:
Grahame Grieve 2019-11-13 07:49:12 +11:00
parent a418f90672
commit 3de429ae6a
4 changed files with 7 additions and 5 deletions

View File

@ -80,6 +80,7 @@ import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.dstu3.model.Type; import org.hl7.fhir.dstu3.model.Type;
import org.hl7.fhir.utilities.CSVReader; import org.hl7.fhir.utilities.CSVReader;
import org.hl7.fhir.utilities.IniFile; import org.hl7.fhir.utilities.IniFile;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
public class Mimic14Importer { public class Mimic14Importer {
@ -561,7 +562,7 @@ public class Mimic14Importer {
} else { } else {
throw new FHIRException("Unhandled Note type '"+cat+"'/'"+desc+"'"); throw new FHIRException("Unhandled Note type '"+cat+"'/'"+desc+"'");
} }
dr.addContent().getAttachment().setContentType("text/plain; charset=UTF-8").setData(csv.cell("text").getBytes(Charset.forName("UTF-8"))); dr.addContent().getAttachment().setContentType("text/plain; charset=UTF-8").setData(TextFile.stringToBytes(csv.cell("text"), false));
bnd.addEntry().setResource(dr); bnd.addEntry().setResource(dr);
} }
System.out.println(Integer.toString(t)+" found"); System.out.println(Integer.toString(t)+" found");

View File

@ -76,6 +76,7 @@ import org.hl7.fhir.r4.model.Reference;
import org.hl7.fhir.r4.model.Type; import org.hl7.fhir.r4.model.Type;
import org.hl7.fhir.utilities.CSVReader; import org.hl7.fhir.utilities.CSVReader;
import org.hl7.fhir.utilities.IniFile; import org.hl7.fhir.utilities.IniFile;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
public class Mimic14Importer { public class Mimic14Importer {
@ -561,7 +562,7 @@ public class Mimic14Importer {
} else { } else {
throw new FHIRException("Unhandled Note type '"+cat+"'/'"+desc+"'"); throw new FHIRException("Unhandled Note type '"+cat+"'/'"+desc+"'");
} }
dr.addContent().getAttachment().setContentType("text/plain; charset=UTF-8").setData(csv.cell("text").getBytes(Charset.forName("UTF-8"))); dr.addContent().getAttachment().setContentType("text/plain; charset=UTF-8").setData(TextFile.stringToBytes(csv.cell("text"), false));
bnd.addEntry().setResource(dr); bnd.addEntry().setResource(dr);
} }
System.out.println(Integer.toString(t)+" found"); System.out.println(Integer.toString(t)+" found");

View File

@ -324,7 +324,7 @@ public class NPMPackageGenerator {
} }
private void buildIndexJson() throws IOException { private void buildIndexJson() throws IOException {
byte[] content = indexer.build().getBytes(Charset.forName("UTF-8")); byte[] content = TextFile.stringToBytes(indexer.build(), false);
addFile(Category.RESOURCE, ".index.json", content); addFile(Category.RESOURCE, ".index.json", content);
} }

View File

@ -182,7 +182,7 @@ public class NpmPackage {
indexer.seeFile(n.substring(8), res.content.get(n)); indexer.seeFile(n.substring(8), res.content.get(n));
} }
} }
res.content.put("package/.index.json", indexer.build().getBytes(Charsets.UTF_8)); res.content.put("package/.index.json", TextFile.stringToBytes(indexer.build(), false));
} }
try { try {
res.npm = JsonTrackingParser.parseJson(res.content.get("package/package.json")); res.npm = JsonTrackingParser.parseJson(res.content.get("package/package.json"));
@ -526,7 +526,7 @@ public class NpmPackage {
tar.closeArchiveEntry(); tar.closeArchiveEntry();
} }
} }
byte[] cnt = new GsonBuilder().setPrettyPrinting().create().toJson(npm).getBytes(Charset.forName("UTF-8")); byte[] cnt = TextFile.stringToBytes(new GsonBuilder().setPrettyPrinting().create().toJson(npm), false);
TarArchiveEntry entry = new TarArchiveEntry("package/package.json"); TarArchiveEntry entry = new TarArchiveEntry("package/package.json");
entry.setSize(cnt.length); entry.setSize(cnt.length);
tar.putArchiveEntry(entry); tar.putArchiveEntry(entry);