Here you can find the source of base64Pad(String s)
Parameter | Description |
---|---|
s | a parameter |
public static String base64Pad(String s)
//package com.java2s; //License from project: Apache License public class Main { /**//from ww w.j av a 2 s. com * Pads a given String s to be usable for BASE64Decoder (if it isn't padded the resulting deoceded data may be wrong) * @param s * @return */ public static String base64Pad(String s) { int toPad = s.length() % 4; for (int i = 0; i < toPad; ++i) { s = s + "="; } return s; } }