i2p.susi.webmail.encoding
Class Base64
java.lang.Object
i2p.susi.webmail.encoding.Base64
- All Implemented Interfaces:
- Encoding
public class Base64
- extends Object
- implements Encoding
- Author:
- susi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64
public Base64()
getName
public String getName()
- Specified by:
getName
in interface Encoding
encode
public String encode(byte[] in)
throws EncodingException
- Specified by:
encode
in interface Encoding
- Returns:
- Base64-encoded String.
- Throws:
EncodingException
encode
public String encode(String str)
throws EncodingException
- Specified by:
encode
in interface Encoding
- Throws:
EncodingException
- See Also:
encode(byte[])
decode
public ReadBuffer decode(String text)
throws DecodingException
- Specified by:
decode
in interface Encoding
- Parameters:
text
-
- Returns:
- Buffer containing a decoded String.
- Throws:
DecodingException
- See Also:
Encoding.decode(byte[], int, int)
decode
public ReadBuffer decode(byte[] in)
throws DecodingException
- Specified by:
decode
in interface Encoding
- Throws:
DecodingException
- See Also:
decode(String)
decode
public ReadBuffer decode(byte[] in,
int offset,
int length)
throws DecodingException
- Specified by:
decode
in interface Encoding
- Returns:
- Output buffer containing decoded String.
- Throws:
DecodingException
- See Also:
decode(String)
decode
public ReadBuffer decode(ReadBuffer in)
throws DecodingException
- Specified by:
decode
in interface Encoding
- Throws:
DecodingException
- See Also:
Encoding.decode(byte[], int, int)