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 TypeMethodDescriptionboolean
Get 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.int
hashCode()
toBase64()
Gets this value as a Base64-encoded string.toHex()
Get this value as a hex-encoded string.toString()
static IdPAttributeValue
valueOf
(byte[] value) Returns anEmptyAttributeValue
orByteAttributeValue
as appropriate.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.shibboleth.idp.attribute.IdPAttributeValue
compareTo
-
Field Details
-
value
private final byte[] valueValue of the attribute.
-
-
Constructor Details
-
ByteAttributeValue
Constructor.- Parameters:
attributeValue
- value of the attribute
-
-
Method Details
-
getValue
public byte[] getValue()Return the value.- Returns:
- the value
-
getNativeValue
Get the native representation of the value of this attribute.- Specified by:
getNativeValue
in interfaceIdPAttributeValue
- Returns:
- the attribute value in native format.
-
getDisplayValue
Get a displayable form of the value for user interfaces and similar purposes.- Specified by:
getDisplayValue
in 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 anEmptyAttributeValue
orByteAttributeValue
as appropriate. This method should be preferred over the constructor when the value may be null or empty.- Parameters:
value
- to inspect- Returns:
EmptyAttributeValue
orByteAttributeValue
-