Package i2p.susi.webmail.encoding
Class EightBit
- java.lang.Object
-
- i2p.susi.webmail.encoding.Encoding
-
- i2p.susi.webmail.encoding.EightBit
-
public class EightBit extends Encoding
Decode only. See encode().- Author:
- susi
-
-
Constructor Summary
Constructors Constructor Description EightBit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bufferdecode(byte[] in, int offset, int length)Bufferdecode(Buffer in)This implementation just calls decode(in.content, in.offset, in.length).voiddecode(InputStream in, Buffer out)Copy in to out, unchangedStringencode(byte[] in)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.StringgetName()
-
-
-
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:
encodein classEncoding- Returns:
- Encoded string.
- Throws:
EncodingException- always
-
decode
public Buffer decode(byte[] in, int offset, int length)
-
decode
public Buffer decode(Buffer in)
Description copied from class:EncodingThis implementation just calls decode(in.content, in.offset, in.length). Most classes will not need to override.- Overrides:
decodein classEncoding- Returns:
- in unchanged
- See Also:
Encoding.decode(byte[], int, int)
-
decode
public void decode(InputStream in, Buffer out) throws IOException
Copy in to out, unchanged- Specified by:
decodein classEncoding- Throws:
DecodingExceptionIOException- Since:
- 0.9.34
- See Also:
Encoding.decode(byte[], int, int)
-
-