public class BinaryValue extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BinaryValue.Type
The type of the binary value.
|
Modifier and Type | Method and Description |
---|---|
static BinaryValue |
createBase64(byte[] bytes)
Creates a binary value using an array of bytes.
|
static BinaryValue |
createBase64(String base64)
Creates a binary value using a base64 string.
|
static BinaryValue |
createFromFile(byte[] bytes,
File file)
Creates a binary value using an array of bytes and a file.
|
boolean |
equals(Object o) |
String |
getBase64()
Returns the base64 representation of the binary value.
|
byte[] |
getBytes()
Returns the byte array of the binary value.
|
File |
getFile()
Return the file that was used to read the binary value.
|
BinaryValue.Type |
getType()
Return the type of the binary value.
|
int |
hashCode() |
public static BinaryValue createBase64(String base64) throws ParseException
base64
- the base64 representation of the binary.ParseException
- if there is an error decoding the provided base64
string.public static BinaryValue createBase64(byte[] bytes)
bytes
- the byte array.public static BinaryValue createFromFile(byte[] bytes, File file)
bytes
- the bytes in the file.file
- the file the bytes were read from.public String getBase64()
public byte[] getBytes() throws ParseException
ParseException
- if this object was created using a base64 string
and there was an error parsing it.public BinaryValue.Type getType()
public File getFile()
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.