title: Base64 encoding in Java with LF and not CRLF
body: <p>I'm trying to encode a byte array to base 64 in java. 
  I need the exact same result like encoding in Python -
  which adds newlines every 76 characters as per RFC 2045 .
  The problem is that the new line is with  (b'\n').</p>
  
  <p>Using encodeBase64Chunked from org.apache.commons.codec.binary.Base64 results the encoded bytes with line separator, which, by default is CRLF (“\r\n”).
  using the encoding of java 8 utils doesn't add this new lines.
  android.util.Base64 is good but can't use it.
  google.common.io.BaseEncoding encoded without the new line.</p>
  
  <p>For now I'm using java.util.Base64.getMimeEncoder(76, LINE_SEPARATOR)
  where LINE_SEPARATOR is \n.</p>
  
  <p>But it's so ugly!</p>
  
  <p>Does anyone know some other library I'm missing?</p>