Package i2p.susi.webmail.encoding
Class SevenBit
- java.lang.Object
-
- i2p.susi.webmail.encoding.Encoding
-
- i2p.susi.webmail.encoding.SevenBit
-
public class SevenBit extends Encoding
Decode only.- Author:
- susi
-
-
Constructor Summary
Constructors Constructor Description SevenBit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Buffer
decode(byte[] in, int offset, int length)
Buffer
decode(Buffer in)
We don't do any 8-bit checks like we do for decode(byte[])void
decode(InputStream in, Buffer out)
Copy in to out, unchanged We don't do any 8-bit checks like we do for decode(byte[])String
encode(byte[] in)
Encode a byte array 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
- always
-
decode
public Buffer decode(byte[] in, int offset, int length) throws DecodingException
- Overrides:
decode
in classEncoding
- Returns:
- Output buffer containing decoded String.
- Throws:
DecodingException
- on illegal characters
-
decode
public Buffer decode(Buffer in)
We don't do any 8-bit checks like we do for decode(byte[])- Overrides:
decode
in 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 We don't do any 8-bit checks like we do for decode(byte[])- Specified by:
decode
in classEncoding
- Throws:
DecodingException
IOException
- Since:
- 0.9.34
- See Also:
Encoding.decode(byte[], int, int)
-
-