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

com.github.scribejava.java8.base64.Java8Base64 Maven / Gradle / Ivy

package com.github.scribejava.java8.base64;

public class Java8Base64 {

    private static final java.util.Base64.Encoder BASE64_ENCODER = java.util.Base64.getEncoder();
    private static final java.util.Base64.Encoder BASE64_URL_ENCODER_WITHOUT_PADDING
            = java.util.Base64.getUrlEncoder().withoutPadding();

    public String internalEncode(byte[] bytes) {
        return BASE64_ENCODER.encodeToString(bytes);
    }

    public String internalEncodeUrlWithoutPadding(byte[] bytes) {
        return BASE64_URL_ENCODER_WITHOUT_PADDING.encodeToString(bytes);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy