Class Base64BinaryType

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>

    public class Base64BinaryType
    extends PrimitiveType<byte[]>
    Primitive type "base64Binary" in FHIR: a sequence of bytes represented in base64
    See Also:
    Serialized Form
    • Method Detail

      • parse

        protected byte[] parse​(String theValue)
        Description copied from class: PrimitiveType
        Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
        Specified by:
        parse in class PrimitiveType<byte[]>
        Parameters:
        theValue - Will not be null
        Returns:
        May return null if the value does not correspond to anything
      • encode

        protected String encode​(byte[] theValue)
        Description copied from class: PrimitiveType
        Subclasses must override to convert a "coerced" value into an encoded one.
        Specified by:
        encode in class PrimitiveType<byte[]>
        Parameters:
        theValue - Will not be null
        Returns:
        May return null if the value does not correspond to anything
      • fhirType

        public String fhirType()
        Specified by:
        fhirType in interface org.hl7.fhir.instance.model.api.IBase
        Overrides:
        fhirType in class Element
      • checkValidBase64

        public void checkValidBase64​(String toCheck)
                              throws ca.uhn.fhir.parser.DataFormatException
        Checks if the passed in String is a valid Base64 encoded String. Will throw a DataFormatException if not formatted correctly.
        Parameters:
        toCheck - String to check if valid Base64
        Throws:
        ca.uhn.fhir.parser.DataFormatException