Package ca.uhn.fhir.util
Class AttachmentUtil
- java.lang.Object
-
- ca.uhn.fhir.util.AttachmentUtil
-
public class AttachmentUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description AttachmentUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
AttachmentUtil
public AttachmentUtil()
-
-
Method Detail
-
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
public static void setUrl(FhirContext theContext, ICompositeType theAttachment, String theUrl)
-
setContentType
public static void setContentType(FhirContext theContext, ICompositeType theAttachment, String theContentType)
-
setData
public static void setData(FhirContext theContext, ICompositeType theAttachment, byte[] theBytes)
-
setSize
public static void setSize(FhirContext theContext, ICompositeType theAttachment, Integer theLength)
-
newInstance
public static ICompositeType newInstance(FhirContext theFhirCtx)
-
-