All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.identityx.clientSDK.piiSupport.transactionContentProviders.TextTransactionContentProvider Maven / Gradle / Ivy

There is a newer version: 5.6.0.2
Show newest version
package com.identityx.clientSDK.piiSupport.transactionContentProviders;

import org.apache.commons.codec.binary.Base64;

import com.identityx.clientSDK.piiSupport.DisplayPNGCharacteristics;

public class TextTransactionContentProvider implements ITransactionContentProvider {

	private String content;

	public TextTransactionContentProvider(String textToDisplay) {
		this.content = Base64.encodeBase64String(textToDisplay.getBytes());
	}
	
	@Override
	public String getContent() {

		return content;
	}

	@Override
	public String getContent(DisplayPNGCharacteristics descriptor) {
		
		return content;
	}
	
	@Override
	public boolean isContentTypeSupported(String contentType) {

		if (contentType.toLowerCase().equals("text/plain")) {
			return true;
		}
		
		return false;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy