Similar to #encodeBytes(byte[]) but returns a byte array instead of instantiating a String. This is more efficient if you're working with I/O streams and have large data sets to encode. @param source The data to convert @return The Base64-encoded data as a byte[] (of ASCII characters) @thr
( byte[] source )
| 845 | * @since 2.3.1 |
| 846 | */ |
| 847 | public static byte[] encodeBytesToBytes( byte[] source ) { |
| 848 | byte[] encoded = null; |
| 849 | try { |
| 850 | encoded = encodeBytesToBytes( source, 0, source.length, Base64.NO_OPTIONS ); |
| 851 | } catch( java.io.IOException ex ) { |
| 852 | assert false : "IOExceptions only come from GZipping, which is turned off: " + ex.getMessage(); |
| 853 | } |
| 854 | return encoded; |
| 855 | } |
| 856 | |
| 857 | |
| 858 | /** |
no test coverage detected