Encodes a byte array into Base64 notation. Does not GZip-compress data. @param source The data to convert @return The data in Base64-encoded form @throws NullPointerException if source array is null @since 1.4
( byte[] source )
| 702 | * @since 1.4 |
| 703 | */ |
| 704 | public static String encodeBytes( byte[] source ) { |
| 705 | // Since we're not going to have the GZIP encoding turned on, |
| 706 | // we're not going to have an java.io.IOException thrown, so |
| 707 | // we should not force the user to have to catch it. |
| 708 | String encoded = null; |
| 709 | try { |
| 710 | encoded = encodeBytes(source, 0, source.length, NO_OPTIONS); |
| 711 | } catch (java.io.IOException ex) { |
| 712 | assert false : ex.getMessage(); |
| 713 | } // end catch |
| 714 | assert encoded != null; |
| 715 | return encoded; |
| 716 | } // end encodeBytes |
| 717 | |
| 718 | |
| 719 |
no test coverage detected