Package i2p.susi.webmail.encoding
Class Base64
- java.lang.Object
-
- i2p.susi.webmail.encoding.Encoding
-
- i2p.susi.webmail.encoding.Base64
-
public class Base64 extends Encoding
- Author:
- susi
-
-
Constructor Summary
Constructors Constructor Description Base64()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(InputStream in, Buffer bout)Stringencode(byte[] in)Encode a byte array to a ASCII or ISO-8859-1 String.voidencode(InputStream in, Writer strBuf)More efficient than superStringgetName()
-
-
-
Method Detail
-
encode
public String encode(byte[] in) throws EncodingException
Description copied from class:EncodingEncode 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:
encodein classEncoding- Returns:
- Base64-encoded String.
- Throws:
EncodingException
-
encode
public void encode(InputStream in, Writer strBuf) throws IOException
More efficient than super- Overrides:
encodein classEncoding- Parameters:
in-- Throws:
IOException- Since:
- public since 0.9.33 with new params
- See Also:
Encoding.encode(String)
-
decode
public void decode(InputStream in, Buffer bout) throws IOException
- Specified by:
decodein classEncoding- Throws:
DecodingExceptionIOException- Since:
- 0.9.34
- See Also:
Encoding.decode(byte[], int, int)
-
-