/** * Decodes bytes from base 64, returning a string. * * @param in bytes to decode * @return decoded string */ public static String decodeToString(byte[] in) { return getString(decode(in)); }
/** * Encodes an input stream to base64, returning a string. * <p> * The stream is guaranteed to be closed when this method returns, whether * successful or not. * * @param in stream to encode * return encoded string, or null if there's an error reading the stream */ public static String encodeToString(InputStream in) { return getString(encode(in)); }
/** * Encodes an input stream to base64, returning a string. * <p> * The stream is guaranteed to be closed when this method returns, whether * successful or not. * * @param in stream to encode * return encoded string, or null if there's an error reading the stream */ public static String encodeToString(InputStream in) { return getString(encode(in)); }
/** * Decodes bytes from base 64, returning a string. * * @param in bytes to decode * @return decoded string */ public static String decodeToString(byte[] in) { return getString(decode(in)); }
/** * Encodes bytes to base 64, returning a string. * * @param in bytes to encode * @return encoded string */ public static String encodeToString(byte[] in) { return getString(encode(in)); }
/** * Encodes bytes to base 64, returning a string. * * @param in bytes to encode * @return encoded string */ public static String encodeToString(byte[] in) { return getString(encode(in)); }