Skip to content

Instantly share code, notes, and snippets.

@KevinMayfield
Created December 6, 2018 15:33
Show Gist options
  • Save KevinMayfield/8243a614492abd72281c4e7b47d1a71a to your computer and use it in GitHub Desktop.
Save KevinMayfield/8243a614492abd72281c4e7b47d1a71a to your computer and use it in GitHub Desktop.
Binary binary = new Binary();
String dummyContent = "<!DOCTYPE html><html><body>SOME TEXT</body></html>";
binary.setContent (dummyContent.getBytes());
binary.setContentType("text/html");
System.out.println(FhirContext.forDstu3().newJsonParser().setPrettyPrint(true).encodeResourceToString(binary));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment