@Test public void testFrom() { byte[] foobarBytes = "foobar".getBytes(); String encoded = new String(encodeBase64(foobarBytes, false), Constants.CHARSET); assertEquals("foobar (encoded) should be decoded the same way as in commons-codec", new String(decodeBase64(encoded.getBytes(Constants.CHARSET))), new String(Base64.fromBase64String(encoded))); }
public static byte[] fromBase64String(final String encoded) { if (encoded == null) { return new byte[0]; } try { return decode(encoded, NO_OPTIONS); } catch (IOException e) { e.printStackTrace(System.err); return new byte[0]; } }
Base64 { public static byte[] fromBase64String(final String encoded) { if (encoded == null) { return new byte[0]; } try { return decode(encoded, NO_OPTIONS); } catch (IOException e) { e.printStackTrace(System.err); return new byte[0]; } } }
Base64 { public static byte[] fromBase64String(final String encoded) { if (encoded == null) { return new byte[0]; } try { return decode(encoded, NO_OPTIONS); } catch (IOException e) { e.printStackTrace(System.err); return new byte[0]; } } private  Base64(); }
Base64 { public static byte[] fromBase64String(final String encoded) { if (encoded == null) { return new byte[0]; } try { return decode(encoded, NO_OPTIONS); } catch (IOException e) { e.printStackTrace(System.err); return new byte[0]; } } private  Base64(); static String toBase64String(final byte[] data); static byte[] fromBase64String(final String encoded); static byte[] fromBase64(final byte[] pArray); }
Base64 { public static byte[] fromBase64String(final String encoded) { if (encoded == null) { return new byte[0]; } try { return decode(encoded, NO_OPTIONS); } catch (IOException e) { e.printStackTrace(System.err); return new byte[0]; } } private  Base64(); static String toBase64String(final byte[] data); static byte[] fromBase64String(final String encoded); static byte[] fromBase64(final byte[] pArray);  }