Class BinaryAttributeValue

Object
se.curity.identityserver.sdk.attribute.BinaryAttributeValue
All Implemented Interfaces:
AttributeOrAttributeValue<AttributeValue>, AttributeValue

public final class BinaryAttributeValue extends Object implements AttributeValue
Binary value attribute representation. Serializes into base64 encoded String.
  • Method Details

    • of

      public static BinaryAttributeValue of(byte[] value)
      Create a BinaryAttributeValue from the provided byte array. Default serialization format of base64 will be used
      Parameters:
      value - The byte array to be contained by this BinaryAttributeValue
      Returns:
      A BinaryAttributeValue representation
    • isEmpty

      public boolean isEmpty()
      Whether the underlying byte array contains any data.
      Specified by:
      isEmpty in interface AttributeValue
      Returns:
      true if the underlying byte array is empty, false if not
    • getBytes

      public byte[] getBytes()
      Get the binary value contained as a byte array.
      Returns:
      A byte array of the binary value
    • getValue

      @Nonnull public @Nonnull String getValue()
      Get the value contained in this BinaryAttributeValue represented as a base64 encoded String.
      Specified by:
      getValue in interface AttributeOrAttributeValue<AttributeValue>
      Returns:
      Base64 encoded string representation of the binary value
    • getValueWithMetadata

      @Nonnull public @Nonnull String getValueWithMetadata()
      Get the value contained in this BinaryAttributeValue represented as a base64 encoded String.
      Specified by:
      getValueWithMetadata in interface AttributeOrAttributeValue<AttributeValue>
      Returns:
      Base64 encoded string representation of the binary value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object