davidmoten / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail
Other
149 stars 40 forks source link

support SMTPUTF8 #132 #133

Closed davidmoten closed 4 months ago

davidmoten commented 4 months ago

See #132

This PR includes always-on support for STMPUTF8. To make it happen a new class Utf8InputStreamReader was created for UTF-8 that doesn't buffer unnecessarily (java.io.InputStreamReader buffers extra for performance reasons which is a problem for us because command have different uses of the underlying InputStream and we can't lose bytes between commands). The new Reader has full test coverage (for what that's worth).

davidmoten commented 4 months ago

I think InputStreamReader may do more buffering than absolutely necessary (underlying inputStream may get reused by another Command so don't want any unused bytes in another Command). I'll investigate further.