MIME-303 Base64OutputStream is two time slower than its Java8 counterpart

While looking and running mime4J benchmarks, I tried some alternative implementations for Base64 encoding / decoding.

Base64InputStream proved to be 20% faster than its Java8 counterpart.

However, throughtput went from 280 MB/s to 520 MB/s by switching to Java8 Base64.getMimeEncoder().wrap(...)

Tests pass and this speeds up message writing operations... Apache James can for instance benefit of it when composing JMAP messages with large attachments.
1 file changed