code: public static String encodeToString(byte[] bytes, boolean lineBreaks) {
      try {
        return new String(encode(bytes, lineBreaks), "ASCII");
      } catch (UnsupportedEncodingException iex) {
        // ASCII should be supported
        throw new RuntimeException(iex);
      }
    }
docs: Encode bytes in Base64.
  
  @param bytes The data to encode.
  @param lineBreaks Whether to insert line breaks every 76 characters in the output.
  @return String with Base64 encoded data.
  @since ostermillerutils 1.04.00