![JAR search and dependency download from the Maven repository](/logo.png)
io.femo.http.drivers.DefaultBase64Driver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-jdk7 Show documentation
Show all versions of http-jdk7 Show documentation
An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request.
On android only asynchronous driver is supported.
This library has been backported to jdk 7 to retain compatibility with android!
The newest version!
package io.femo.http.drivers;
import io.femo.http.Base64Driver;
import javax.xml.bind.DatatypeConverter;
/**
* Created by Felix Resch on 08-Apr-16.
*/
public class DefaultBase64Driver implements Base64Driver {
@Override
public String encodeToString(byte[] data) {
return DatatypeConverter.printBase64Binary(data);
}
@Override
public byte[] decodeFromString(String data) {
return DatatypeConverter.parseBase64Binary(data);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy