public static String encodeBytes ( byte [ ] bytes ) { String ret = null ; try { // Obfuscate the string if ( bytes != null ) ret = new String ( Base64 . encodeBase64 ( bytes ) ) ; } catch ( NoClassDefFoundError e ) { ret = new String ( bytes ) ; System . out . println ( "WARNING: unable to encode: " + e . getClass ( ) . getName ( ) + ": " + e . getMessage ( ) ) ; } return ret ; }
Returns the given byte array after if it has been encoded .