code: 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;
      }
docs: Returns the given byte array after if it has been encoded.
  @param bytes The byte array to be encoded
  @return The encoded string