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

io.femo.http.drivers.DefaultBase64Driver Maven / Gradle / Ivy

Go to download

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