Package net.shibboleth.idp.attribute
Class ByteAttributeValue
java.lang.Object
net.shibboleth.idp.attribute.ByteAttributeValue
- All Implemented Interfaces:
Comparable<IdPAttributeValue>,IdPAttributeValue
A
byte[] value for an IdPAttribute.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet a displayable form of the value for user interfaces and similar purposes.Get the native representation of the value of this attribute.byte[]getValue()Return the value.inthashCode()toBase64()Gets this value as a Base64-encoded string.toHex()Get this value as a hex-encoded string.toString()static IdPAttributeValuevalueOf(byte[] value) Returns anEmptyAttributeValueorByteAttributeValueas appropriate.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.shibboleth.idp.attribute.IdPAttributeValue
compareTo
-
Field Details
-
value
@Nonnull private final byte[] valueValue of the attribute.
-
-
Constructor Details
-
ByteAttributeValue
Constructor.- Parameters:
attributeValue- value of the attribute
-
-
Method Details
-
getValue
@Nonnull public byte[] getValue()Return the value.- Returns:
- the value
-
getNativeValue
Get the native representation of the value of this attribute.- Specified by:
getNativeValuein interfaceIdPAttributeValue- Returns:
- the attribute value in native format.
-
getDisplayValue
Get a displayable form of the value for user interfaces and similar purposes.- Specified by:
getDisplayValuein interfaceIdPAttributeValue- Returns:
- a displayable value
-
toHex
Get this value as a hex-encoded string.- Returns:
- a hex-encoded string
-
toBase64
Gets this value as a Base64-encoded string.- Returns:
- a Base64-encoded string
- Throws:
EncodingException- on failure to base64 encode byte value
-
equals
-
hashCode
public int hashCode() -
toString
-
valueOf
Returns anEmptyAttributeValueorByteAttributeValueas appropriate. This method should be preferred over the constructor when the value may be null or empty.- Parameters:
value- to inspect- Returns:
EmptyAttributeValueorByteAttributeValue
-