com.yoti.api.client.spi.remote.MediaValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yoti-sdk-api Show documentation
Show all versions of yoti-sdk-api Show documentation
Java SDK for simple integration with the Yoti platform
The newest version!
package com.yoti.api.client.spi.remote;
import static org.bouncycastle.util.encoders.Base64.toBase64String;
import com.yoti.api.client.Media;
public class MediaValue implements Media {
private final String mimeType;
private final byte[] content;
public MediaValue(String mimeType, byte[] content) {
this.mimeType = mimeType;
this.content = content;
}
@Override
public String getMimeType() {
return mimeType;
}
@Override
public byte[] getContent() {
return content.clone();
}
@Override
public String getBase64Content() {
return String.format("data:%s;base64,%s", getMimeType(), toBase64String(getContent()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy