code: public static Encoder getMimeEncoder(int lineLength, byte[] lineSeparator) {
          a(lineSeparator).shouldNotBeNull();
          int[] base64 = Decoder.fromBase64;
          for (byte b : lineSeparator) {
              if (base64[b & 0xff] != -1)
                  throw new IllegalArgumentException(
                          "Illegal base64 line separator character 0x" + Integer.toString(b, 16));
          }
          if (lineLength <= 0) {
              return Encoder.RFC4648;
          }
          return new Encoder(false, lineSeparator, lineLength >> 2 << 2, true);
      }
docs: Returns a {@link Encoder} that encodes using the
  <a href="#mime">MIME</a> type base64 encoding scheme
  with specified line length and line separators.
  
  @param   lineLength
  the length of each output line (rounded down to nearest multiple
  of 4). If {@code lineLength <= 0} the output will not be separated
  in lines
  @param   lineSeparator
  the line separator for each output line
  
  @return  A Base64 encoder.
  
  @throws  IllegalArgumentException if {@code lineSeparator} includes any
  character of "The Base64 Alphabet" as specified in Table 1 of
  RFC 2045.