Package i2p.susi.webmail.encoding
Class HTML
- java.lang.Object
-
- i2p.susi.webmail.encoding.Encoding
-
- i2p.susi.webmail.encoding.HTML
-
public class HTML extends Encoding
- Author:
- user
-
-
Constructor Summary
Constructors Constructor Description HTML()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decode(InputStream in, Buffer out)
String
encode(byte[] in)
Encode a byte array to a ASCII or ISO-8859-1 String.String
encode(String str)
Encode a (UTF-8) String to a ASCII or ISO-8859-1 String.String
getName()
-
-
-
Method Detail
-
encode
public String encode(byte[] in) throws EncodingException
Description copied from class:Encoding
Encode a byte array to a ASCII or ISO-8859-1 String. Output must be SMTP-safe: Line length of 998 or less, using SMTP-safe characters, followed by \r\n, and must not start with a '.' unless escaped by a 2nd dot. For some encodings, max line length is 76.- Specified by:
encode
in classEncoding
- Returns:
- Encoded string.
- Throws:
EncodingException
-
encode
public String encode(String str) throws EncodingException
Description copied from class:Encoding
Encode a (UTF-8) String to a ASCII or ISO-8859-1 String. Output must be SMTP-safe: Line length of 998 or less, using SMTP-safe characters, followed by \r\n, and must not start with a '.' unless escaped by a 2nd dot. For some encodings, max line length is 76. This implementation just converts the string to a byte array and then calls encode(byte[]). Most classes will not need to override.- Overrides:
encode
in classEncoding
- Throws:
EncodingException
- See Also:
Encoding.encode(byte[])
-
decode
public void decode(InputStream in, Buffer out) throws DecodingException
- Specified by:
decode
in classEncoding
- Throws:
DecodingException
- See Also:
Encoding.decode(byte[], int, int)
-
-