org.scribe.services.Base64Encoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.marketplace.store.web
Show all versions of com.liferay.marketplace.store.web
Liferay Marketplace Store Web
The newest version!
package org.scribe.services;
public abstract class Base64Encoder
{
private static Base64Encoder instance;
public static synchronized Base64Encoder getInstance()
{
if (instance == null)
{
instance = createEncoderInstance();
}
return instance;
}
private static Base64Encoder createEncoderInstance()
{
if (CommonsEncoder.isPresent())
{
return new CommonsEncoder();
}
else
{
return new DatatypeConverterEncoder();
}
}
public static String type()
{
return getInstance().getType();
}
public abstract String encode(byte[] bytes);
public abstract String getType();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy