FIM.Util.Coder.Base64
Class Base64Coder
java.lang.Object
|
+--FIM.Util.Coder.Base64.Base64Coder
- public final class Base64Coder
- extends Object
A class for encoding and decoding using the algorithm BASE64.
BASE64 Encoding is defined in RFC 1341 chapter 5.2
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
Method Summary |
(package private) static void |
()
|
static byte[] |
base64Decode(byte[] encoded)
Decodes an array of bytes from an array of bytes by using the base64 algorithm
Input length must be a multiple of 4 (padding required at end if necessary). |
static byte[] |
base64Decode(String encoded)
Decodes an array of bytes from a string by using the base64 algorithm.
|
static byte[] |
base64Encode(byte[] raw)
Encodes an array of bytes into an array of bytes by using the base64 algorithm.
|
static String |
base64EncodeAsString(byte[] raw)
Encodes an array of bytes into a string by using the base64 algorithm.
|
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64Coder
public Base64Coder()
static void ()
base64Encode
public static final byte[] base64Encode(byte[] raw)
- Encodes an array of bytes into an array of bytes by using the base64 algorithm.
Uses padding so output is always multiple of 4.
- Parameters:
raw
- the array of byte to encode- Returns:
- the encoded array of bytes
base64EncodeAsString
public static final String base64EncodeAsString(byte[] raw)
- Encodes an array of bytes into a string by using the base64 algorithm.
Uses padding so output is always multiple of 4.
- Parameters:
raw
- the array of byte to encode- Returns:
- the encoded string
base64Decode
public static final byte[] base64Decode(byte[] encoded)
- Decodes an array of bytes from an array of bytes by using the base64 algorithm
Input length must be a multiple of 4 (padding required at end if necessary).
- Parameters:
encoded
- the encoded array of bytes- Returns:
- the decoded array of bytes
base64Decode
public static final byte[] base64Decode(String encoded)
- Decodes an array of bytes from a string by using the base64 algorithm.
Input length must be a multiple of 4 (padding required at end if necessary).
- Parameters:
encoded
- the encoded string- Returns:
- the decoded array of bytes
main
public static final void main(String[] args)
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.