Class EightBit


  • public class EightBit
    extends Encoding
    Decode only. See encode().
    Author:
    susi
    • Constructor Detail

      • EightBit

        public EightBit()
    • Method Detail

      • encode

        public String encode​(byte[] in)
                      throws EncodingException
        TODO would be nice to implement this, as it is supported on the project server, but content must be CRLF terminated with a max of 998 chars per line. And you can't have leading dots either, we'd have to prevent or double-dot it. That would be expensive to check, using either a double read or pulling it all into memory. So it's prohibitive for attachments. We could do it for the message body, since it's in memory already, but that's not much of a win. ref: https://stackoverflow.com/questions/29510178/how-to-handle-1000-character-lines-in-8bit-mime
        Specified by:
        encode in class Encoding
        Returns:
        Encoded string.
        Throws:
        EncodingException - always
      • decode

        public Buffer decode​(byte[] in,
                             int offset,
                             int length)
        Overrides:
        decode in class Encoding
        Returns:
        Output buffer containing decoded String.