Package ca.uhn.fhir.util
Class AttachmentUtil
java.lang.Object
ca.uhn.fhir.util.AttachmentUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IPrimitiveType<String>getOrCreateContentType(FhirContext theContext, ICompositeType theAttachment)static IPrimitiveType<byte[]>getOrCreateData(FhirContext theContext, ICompositeType theAttachment)Fetches the base64Binary value of Attachment.data, creating it if it does not already exist.static IPrimitiveType<String>getOrCreateUrl(FhirContext theContext, ICompositeType theAttachment)static ICompositeTypenewInstance(FhirContext theFhirCtx)static voidsetContentType(FhirContext theContext, ICompositeType theAttachment, String theContentType)static voidsetData(FhirContext theContext, ICompositeType theAttachment, byte[] theBytes)static voidsetSize(FhirContext theContext, ICompositeType theAttachment, Integer theLength)static voidsetUrl(FhirContext theContext, ICompositeType theAttachment, String theUrl)
-
Constructor Details
-
AttachmentUtil
public AttachmentUtil()
-
-
Method Details
-
getOrCreateData
public static IPrimitiveType<byte[]> getOrCreateData(FhirContext theContext, ICompositeType theAttachment)Fetches the base64Binary value of Attachment.data, creating it if it does not already exist. -
getOrCreateContentType
public static IPrimitiveType<String> getOrCreateContentType(FhirContext theContext, ICompositeType theAttachment) -
getOrCreateUrl
public static IPrimitiveType<String> getOrCreateUrl(FhirContext theContext, ICompositeType theAttachment) -
setUrl
-
setContentType
public static void setContentType(FhirContext theContext, ICompositeType theAttachment, String theContentType) -
setData
-
setSize
public static void setSize(FhirContext theContext, ICompositeType theAttachment, Integer theLength) -
newInstance
-